JACKSON, Miss. — A federal appeals court said Thursday that Mississippi can enforce a law that allows merchants and government employees to cite religious beliefs to deny services to same-sex couples, but opponents of the law immediately pledged to appeal.

A three-judge panel of the 5th U.S. Circuit Court of Appeals reversed a judge’s decision that had blocked the law.

U.S. District Judge Carlton Reeves had ruled that the law unconstitutionally establishes preferred beliefs and creates unequal treatment for LGBT people. His ruling prevented the law from taking effect last July.

The 5th Circuit panel did not rule on whether the law is constitutional.

It said plaintiffs failed to prove they would be harmed by the law, “but the federal courts must withhold judgment unless and until that plaintiff comes forward.”

Legal experts said the law is the broadest religious-objections measure enacted by any state.

Championed and signed in 2016 by Republican Gov. Phil Bryant, it aims to protect three beliefs: marriage is only between a man and a woman; sex should only take place in such a marriage; and 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 LGBT people. It could affect adoptions and foster care, business practices and school bathroom policies.

Robert McDuff, an attorney for some of the people who sued to try to block the law, criticized the appeals court for saying plaintiffs had failed to show they would be harmed.

“People should not have to live through discrimination in order to challenge this obviously unconstitutional bill,” McDuff said.