JACKSON, Miss. -- 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 an order overnight in two lawsuits blocking the law just moments before it was to take effect Friday.

State attorneys are expected to appeal.

Get Breaking News Delivered to Your Inbox

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

The American Civil Liberties Union of Mississippi filed suit in May in an attempt to stop the law. Other suits were brought against the measure, as well.

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.

Republican Mississippi Gov. Phil Bryant signed House Bill 1523 in April, winning praise from conservative Christian groups. The Family Research Council gave him a religious freedom award for signing the bill, 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.

Reeves wrote, "HB 1523 favors Southern Baptist over Unitarian doctrine, Catholic over Episcopalian doctrine, and Orthodox Judaism over Reform Judaism doctrine, to list just a few examples."

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 wrote that the title, text and history of the bill indicate it "was the state's attempt to put LGBT citizens back in their place" after the Supreme Court's marriage ruling.

Roberta Kaplan, an attorney who filed one of the lawsuits challenging the Mississippi law, said in a statement that Reeves "enforced the fundamental constitutional principle that the government cannot establish any religion."

"As a result, Mississippi will no longer be permitted to favor some 'religious beliefs' over others, and the civil rights of LGBT Mississippians will not be subordinated to the religious beliefs of only certain religious groups," said Kaplan, who represents Campaign for Southern Equality.

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."

CBS affiliate WJTVin Jackson reports theACLU suit was filed on behalf of Nykolas Alford and Stephen Thomas, a couple who's been engaged for two years.

"When HB 1523 passed, it was heartbreaking because it takes away our chance to finally be treated equally. At a time when we're supposed to be excited as a couple engaged to be married, this law permits discrimination against us simply because of who we are. This is not the Mississippi we're proud to call home. We're hopeful others will come to realize this and not allow this harmful measure to become law," they said.

While critics have called the law anti-gay and a legalization of bigoted behavior, supporters have flipped the script, saying they were attempting to protect themselves from discrimination from the federal government over their religious beliefs.