A federal judge on Wednesday overturned the state gay marriage ban in Montana, one of the last states to continue its legal fight despite rulings from appeals courts that found gay and lesbian couples could wed.

U.S. District Judge Brian Morris ruled Montana's constitutional amendment limiting marriage to between a man and a woman violates the 14th Amendment's Equal Protection Clause.

"This Court recognizes that not everyone will celebrate this outcome," Morris wrote. "This decision overturns a Montana Constitutional amendment approved by the voters of Montana. Yet the United States Constitution exists to protect disfavored minorities from the will of the majority."

The clerk of the district court in Montana's most populous county, Yellowstone, said she expects her office to start issuing marriage licenses to same-sex couples Thursday morning.

"We're ready to go," Kristie Lee Boelter said. "For my office, nothing will be different than any other day."

Also Thursday, the ACLU is planning celebrations at county courthouses in Billings, Bozeman, Butte, Great Falls, Helena and Missoula. The group will have officiants there for couples who wish to marry immediately, ACLU spokeswoman Amy Cannata said.

The 9th U.S. Circuit Court of Appeals ruled in September that Idaho and Nevada's bans are unconstitutional. Montana is part of the 9th Circuit, and Morris cited the appeals court's opinion in his ruling.

"The time has come for Montana to follow all the other states within the Ninth Circuit and recognize that laws that ban same-sex marriage violate the constitutional right of same-sex couples to equal protection of the laws," he wrote.

Four same-sex couples filed a lawsuit in May challenging Montana's ban: Angie and Tonya Rolando; Shauna and Nicole Goubeaux; Ben Milano and Chase Weinhandl; and Sue Hawthorne and Adel Johnson.

"Calling Tonya my partner, my significant other, my girlfriend, my perpetual fiancée has never done justice to our relationship," Angie Rolando said. "Now I can look forward to the day when I can introduce Tonya as my wife.

"Love won today," Angie Rolando said in a statement released by the American Civil Liberties Union of Montana.

The Goubeauxes, the Weinhandls, and Hawthorne and Johnson all were married in other states.

Montana ACLU legal director Jim Taylor said the case was about equality and "basic fairness." Morris' ruling recognizes there is no legitimate basis on which to deny same-sex couples the right to marry, he said.

Montana's Republican attorney general, Tim Fox, vowed to continue the legal fight.

"It is the attorney general's sworn duty to uphold and defend Montana's constitution until such time as there is no further review or no appeal can be made in a court of law," Fox said in an email to The Associated Press.

The state will appeal "in light of the fact that there are conflicting federal court decisions and no final word from the U.S. Supreme Court," he said.

Three states — Montana, Kansas and South Carolina — continued their legal fights against same-sex marriage despite rulings from federal appeals courts that concluded gay and lesbian couples have the right to marry.

On Wednesday, a judge issued the first gay marriage licenses and a couple was married in South Carolina, even as the state attorney general asked the U.S. Supreme Court to step in and block the unions.

Before Wednesday, same-sex couples could marry in 32 states, parts of Kansas and Missouri, and the District of Columbia.

Montana Gov. Steve Bullock said in a statement he has instructed his administration to quickly take the appropriate steps to ensure legally married same-sex couples are recognized and afforded the same rights and responsibilities that married Montanans enjoy.

Voters in the state in 2004 approved a constitutional amendment banning gay marriage. Such bans have been falling around the country since the Supreme Court last year struck down part of the federal Defense of Marriage Act.

Associated Press