The "How I Met Your Mother" star and his actor/chef mate didn't wait for New York's state government to get around to recognizing their bond before starting a family, though. They're raising eight-month-old twins now.

Neil Patrick Harris Charms As Tony Awards Host

Harris, who hosted this month's Tony Awards, had been vocal before the vote about his hopes the same-sex marriage bill would pass.

The bill to let same-sex couples wed passed in New York's Senate 33-29 late Friday night with the help of two last-minute Republican votes in favor. It had already cruised through the Democratic-controlled Assembly.

Once the Senate passed the measure, Gov. Andrew Cuomo, who had made the issue his cause celebrate, immediately signed it into law.

Emmy Awards Rewind: Most Memorable Moments of Last Year

That made New York the sixth and by far the largest state to let gay couples marry—and the first state to do so through a Republican-controlled legislature.

The law will go into effect within 30 days. Assuming Harris and Burtka are among the first in line, they could be husbands by the end of July.