Ruth Hackford-Peer, right, and Kim Hackford-Peer, standing next to her, are married by Rev. Curtis Price, left, while hugging their two children Riley Hackford-Peer, back middle, and Casey Hackford-Peer, bottom middle, in the lobby of the Salt Lake County Clerk's Office in Salt Lake City on Friday.

A federal judge has struck down Utah's same-sex marriage ban, saying it is unconstitutional. In a 53-page ruling issued Friday, U.S. District Judge Robert Shelby said the measure passed by voters in 2004 violates gay and lesbian couples' rights to due process and equal protection under the 14th Amendment, setting up a major appeal that could go all the way to the Supreme Court.

The state had not filed a stay request with the court in the event that it lost the case challenging the ban, opening the door for the state to marry gay couples. Salt Lake County immediately began issuing marriage licenses to same-sex couples — the mayor even came out to conduct some of the services himself.

After Judge Shelby's decision, the state filed an appeal with the 10th Circuit court of Appeals, asking the federal appellate court to stay the ruling, which would temporarily halt the marriages, until it the appeals court rules.

The Utah ruling comes just a day after the New Mexico Supreme Court ruled to allow same-sex marriage across that state, ending legal ambiguity that had produced a patchwork arrangement in which some counties permitted gay nuptials while others prohibited them.

"It feels unreal," plaintiff Moudi Sbeity, who sued along with his partner, Derek Kitchen, told the Salt Lake Tribune. "I'm just very thrilled that Derek and I will be able to get married soon, if all goes well and the state doesn't appeal."

The lawsuit was brought by three gay and lesbian couples in Utah.

As the Salt Lake Tribune noted, the ruling is the first to address whether states may ban gay marriage since the U.S. Supreme Court struck down the federal Defense of Marriage Act this summer.

The ruling has angered many conservative Utah leaders, including Republican Gov. Gary Herbert.

"I am very disappointed an activist federal judge is attempting to override the will of the people of Utah. I am working with my legal counsel and the acting attorney general to determine the best course to defend traditional marriage within the borders of Utah," Herbert told The Associated Press.

If the 10th Circuit grants the stay, it could lead to a potential legal headache for the couples — similar to the one created after 2008 passage of Proposition 8 in California — if the state appeals the decision.

Proposition 8 was a state constitutional amendment sponsored by opponents of same-sex marriage, and approved by voters, that temporarily made it illegal for gay couples to get married in the state. The measure was overturned by the Supreme Court in June.

Clifford Rosky, a law professor at the University of Utah, told Al Jazeera that the implications of this case are significant, and if the case ends up before the nation's highest court, it could be the one that finally answers the question of whether or not same-sex couples have the right to get married.

"What's so important about this, is that this is the first judge that had to apply the Supreme Court's decision," on the Defense of Marriage Act (DOMA) from earlier this year, he said. "It means everything for other states. If the ruling is upheld, then same sex couples would have the freedom to marry in all 50 states."

Rosky, who is also the chair of the board of directors at Equality Utah, an organization advocating equal rights and protections for lesbian, gay, bisexual and transgender people, said even if the Supreme Court declines to take up the case, if the 10th Circuit agrees with this judge, all same-sex couples within the 10th Circuit would be able to marry.

The 10th Circuit includes Utah, Wyoming, Colorado, New Mexico, Kansas and Oklahoma.

"It sends a very powerful message that a federal judge in Utah, one of the country's most conservative, Republican states, even here a judge recognized that laws against same-sex marriage are unconstitutional," Rosky said. "This is Utah. This isn't California or Massachusetts."

In a statement to Al Jazeera, Chad Griffin, president of the gay advocacy group the Human Rights Campaign, said Shelby's decision "renewed hope" for same-sex couples in the state that they would "soon be free to marry, and there is no legal or moral reason for the state to stand in their way."

Utah's gay marriage cases have been watched very closely by other states, particularly because of the state's opposition to gay marriage as the home of the Church of Jesus Christ of Latter-day Saints.

"The Church has been consistent in its support of traditional marriage while teaching that all people should be treated with respect," church spokesman Eric Hawkins told Al Jazeera in an email. "This ruling by a district court will work its way through the judicial process. We continue to believe that voters in Utah did the right thing by providing clear direction in the state constitution that marriage should be between a man and a woman and we are hopeful that this view will be validated by a higher court."

Shelby said the state failed to show that allowing same-sex marriages would affect opposite-sex marriages in any way, and that the state's unsupported fears and speculations are insufficient to justify denying same-sex marriages.

Attorneys for the state argued that Utah's law promotes the state's interest in "responsible procreation" and the "optimal mode of child-rearing."