SALT LAKE CITY — A federal judge struck down Utah’s same-sex marriage ban Friday in a decision that brings a nationwide shift toward allowing gay marriage to a conservative state where the Mormon church has long been against it.
US District Judge Robert J. Shelby issued a ruling Friday saying Utah’s law passed by voters in 2004 violates gay and lesbian couples’ rights to due process and equal protection under the 14th Amendment.
Shelby said the state failed to show that allowing same-sex marriages would affect opposite-sex marriages in any way.
‘‘In the absence of such evidence, the State’s unsupported fears and speculations are insufficient to justify the State’s refusal to dignify the family relationships of its gay and lesbian citizens,’’ Shelby wrote.
It was unclear what the immediate effect would be, because the state can still appeal. The Utah attorney general’s office filed notice that it will appeal the ruling.
Dahnelle Burton-Lee, the deputy clerk of Salt Lake County, said the district attorney authorized her office to begin issuing the marriage licenses hours after the court ruling.
The ruling comes the same week New Mexico’s highest court legalized gay marriage after declaring it unconstitutional to deny marriage licenses to same-sex couples.
A new law passed in Hawaii last month now allows gay couples to wed.
The ruling is the first on a state same-sex marriage ban since the Supreme Court last summer struck down part of the Defense of Marriage Act, which stipulated marriage was between a man and woman.
During a nearly four-hour hearing earlier this month in Salt Lake City, attorneys for the state argued that Utah’s law promotes the state’s interest in ‘‘responsible procreation’’ and the ‘‘optimal mode of child-rearing.’’ They also asserted it is not the courts’ role to determine how a state defines marriage.