JACKSON, Miss. (AP) — Supporters of the LGBT rights movement won the latest round against conservatives when a federal judge ruled that a Mississippi "religious objections" law is unconstitutional, just moments before it was to take effect Friday.

The decision could influence federal judges considering challenges to other state laws and will be held up by gay-rights advocates as another reason for legislatures to back off considering similar bills.

Mississippi Republican Gov. Phil Bryant vowed to appeal.

The law sought to protect three beliefs: That marriage is only between a man and a woman; that sex should only take place in such a marriage; and that a person's gender is determined at birth and cannot be altered.

It would allow clerks to cite religious objections to recuse themselves from issuing marriage licenses to same-sex couples, and would protect merchants who refuse services to lesbian, gay, bisexual or transgender people. It could affect adoptions and foster care, business practices and school bathroom policies.

U.S. District Judge Carlton Reeves found that it unconstitutionally establishes preferred beliefs and creates unequal treatment for gay people.

It is "the state's attempt to put LGBT citizens back in their place" in response to last summer's Supreme Court ruling that legalized gay marriage nationwide.

"In physics, every action has its equal and opposite reaction," wrote Reeves, who was nominated to the bench by President Barack Obama in 2010. "In politics, every action has its predictable overreaction."

The governor said it "simply provides religious accommodations granted by many other states and federal law."

"I am disappointed Judge Reeves did not recognize that reality. I look forward to an aggressive appeal," Bryant said in a statement.

Attorney General Jim Hood — the lone Democrat in statewide office — had been defending the bill but reversed course after the ruling, saying he doesn't think an appeal is worthwhile for a state with budget problems.

"The fact is that the churchgoing public was duped into believing that HB1523 protected religious freedoms," Hood said.

More than 100 bills were filed in more than 20 state legislatures across the nation in response to the Supreme Court ruling legalizing gay marriage, UCLA law professor Douglas NeJaime testified before Reeves last week.

NeJaime said Mississippi was the only state to enact a law listing specific beliefs to be protected.

Weeks before Bryant signed the bill, the governor of Georgia vetoed one that was less stringent, amid pressure from groups that said it would hurt the state economy by creating a hostile atmosphere for lesbian, gay, bisexual or transgender people. Some Mississippi businesspeople have expressed similar concerns, though the Republican-led Legislature aligned with religious leaders — particularly Baptists and Pentecostals — who said the Supreme Court marriage ruling could pressure people to compromise their own values.

North Carolina also became a key front in the battle over LGBT rights when it enacted a law this year requiring transgender people to use restrooms corresponding to the sex on their birth certificates in the state's schools, universities and many other public buildings. Challenges have been filed by the Justice Department and the ACLU.

Tennessee's governor in April signed a bill allowing mental health counselors to refuse to treat patients based on the therapist's religious or personal beliefs.

Elizabeth Sepper, a law professor at Washington University in St. Louis, said the First Amendment prohibits government from favoring one set of beliefs over others.

"The ruling is significant in really protecting our First Amendment," Sepper said. "I think it matters in that way because we saw a lot of state legislatures discussing adoption of bills just like Mississippi's or some variation upon it."

Bryant signed Mississippi's House Bill 1523 in April, winning praise from conservative Christian groups. The Family Research Council gave the governor a religious freedom award, and Bryant said the "secular, progressive world had decided they were going to pour their anger and their frustration" on him because of the bill.

State attorneys argued that the Mississippi law provides reasonable accommodations for people with deeply held religious beliefs that gay marriage is wrong.

Mississippi Health Department spokeswoman Liz Sharlot said only one clerk filed a form seeking recusal from issuing marriage licenses. She told The Associated Press that the department no longer has a record of who filed it because the vital records registrar mailed the form back to the clerk after Reeves' ruling.

No judges had filed forms seeking recusal from officiating over same-sex weddings, said Beverly Pettigrew Kraft, spokeswoman for the state administrative office of courts.

Rob McDuff, an attorney who filed the Mississippi Center for Justice lawsuit challenging the law, said "it is now time for all of us, as Mississippians, to move beyond division and come together in the ongoing pursuit of a society that respects the rights of everyone."

This was Reeves' second high-profile case dealing with gay rights. In late 2014, he struck down Mississippi's ban on same-sex marriage but put his ruling on hold while the state appealed. The Supreme Court marriage ruling came down while the Mississippi appeal was pending.

___

Follow Emily Wagster Pettus on Twitter: http://twitter.com/EWagsterPettus .

____

Associated Press writer Jonathan Drew in Raleigh, North Carolina, contributed to this report.