Deeply conservative Utah, where the Mormon church holds significant sway and is virulently opposed to same-sex nuptials, became the 18th state to legalize the unions Friday -- and the second in as many days.
New Mexico's state Supreme Court overturned that state's ban Thursday. Same-sex marriage is also legal in the District of Columbia.
Thirty-two states have banned gay marriage.
It wasn't immediately clear how many same-sex couples were granted licenses across the state but gay couples flooded the city clerk's office and a hallway outside Salt Lake City Hall, seeking a marriage license.
The line was still out the door at 5 p.m. Friday, but city officials told CNN they would not turn anyone away.
"It's a madhouse down here," state Sen. Jim Dabakis, who is openly gay, told CNN. "There's hundreds of people, wedding certificates are being issued, there's marriages taking place all over the hallways. Everybody's embracing. It's just a warm, wonderful moment in the state of Utah."
Three couples filed suit in federal court challenging the ban. U.S. District Judge Richard Shelby wrote in a 53-page decision state lawyers could not prove permitting gays and lesbians to wed had any negative impact on heterosexual couples or society at large.
Shelby wrote "current laws deny its gay and lesbian citizens their fundamental right to marry and, in so doing, demean the dignity of these same-sex couples for no rational reason.
"Accordingly, the court finds that these laws are unconstitutional."
Opponents expressed outrage at Shelby's decision and pledged to appeal the ruling though for reasons not stated they did not appeal for an immediate stay, leading to Friday's frenetic scene in Salt Lake.
Brian Brown, president of the National Organization for Marriage, called Shelby's ruling "a travesty of justice."
Utah Gov. Gary Herbert labeled Shelby "an activist federal judge" and said he was huddling with state lawyers to plot their strategy to appeal the decision.
Lawsuits have been filed in multiple states where gay marriage is banned but supporters and opponents alike had kept a close eye on the Utah case in particular because it was playing out in one of the nation's most socially conservative states.
2014: The Year in Music [PHOTOS]