WASHINGTON — One gay couple met on a Star Trek fan site, another dancing at a country-western bar. Some have been together for months, others more than a decade.

About 150 pairs had something in common Wednesday, though, applying for wedding licenses on the first day same-sex unions became legal in the capital.

The mood at the marriage bureau inside the city’s Moultrie Courthouse was celebratory. Couples clapped, called out “Congratulations” and cupcakes and tulips were handed out. One family said it was important to show up the first day.

“It sets a good example,” said district resident Christine Burkhart, who married Denise Gavin in 2006 in Washington.

The pair stood in line rocking their twin 4-month-olds, Milo and Josephine. “We’ll be able to tell them that we all went together as a family.”

The District of Columbia became the sixth place in the country permitting same-sex unions. Connecticut, Iowa, Massachusetts, New Hampshire and Vermont also issue same-sex couples licenses.

That’s the day they can pick up their licenses.

Sinjoyla Townsend, 41, and her partner of 12 years, Angelisa Young, 47, claimed the first spot in line just after 6 a.m. The district residents are already domestic partners.

“It’s like waking up Christmas morning,” said Young. “It’s really like a dream come true.”

The gay marriage law was introduced in the 13-member D.C. Council in October and had near-unanimous support from the beginning. Mayor Adrian M. Fenty signed it in December, but because Washington is a federal district, the law had to undergo a congressional review period that expired March 2.

The Supreme Court on Tuesday refused to block the law.