Updated

A federal judge has blocked a Mississippi law that would let merchants and government employees cite religious beliefs in denying or delaying services to same-sex couples.

U.S. District Judge Carlton Reeves filed orders in two lawsuits blocking the law just moments before it was to take effect Friday.

State attorneys are expected to appeal.

The law would 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 could affect adoptions and foster care, business practices and school bathroom policies.

Reeves wrote that the law is unconstitutional because "the state has put its thumb on the scale to favor some religious beliefs over others." He also wrote that it violates the Constitution's equal protection guarantee.

More than 100 bills were filed in more than 20 state legislatures across the nation in response to the U.S. Supreme Court ruling nearly a year ago that legalized same-sex marriage nationwide, UCLA law professor Douglas NeJaime testified before Reeves last week.

"In physics, every action has its equal and opposite reaction," Reeves wrote. "In politics, every action has its predictable overreaction."

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

Reeves notes that one section of the bill specifies that the state could not punish any religious organization that refuses to solemnize a same-sex marriage.

"There is nothing new or controversial about that section," Reeves wrote. "Religious organizations already have that right under the Free Exercise Clause of the First Amendment."