JACKSON, Miss. (AP) – A federal judge has blocked a Mississippi law that would let merchants and government employees cite religious beliefs to deny or delay 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 his decisions.

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.

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.