Phil Bryant, Clay Chandler

Republican Gov. Phil Bryant, center, walks behind his spokesman, Clay Chandler, left, as reporters ask him if he will sign a bill that would let government employees and private businesses cite religious beliefs to deny services to same-sex couples who want to marry, following a news conference on a youth jobs program at the Capitol in Jackson, Miss., Friday, April 1, 2016. Bryant would not say whether he will sign House Bill 1523, noting he had not received it yet and would need to study it first. Chandler tried to block reporters from asking questions by saying repeatedly: "Not today. Not today." (AP Photo/Rogelio V. Solis)

(Rogelio V. Solis)

Mississippi's governor has signed a law that allows public and private businesses to refuse service to gay couples based on the employers' religious beliefs.

Gov. Phil Bryant signed House Bill 1523 on Tuesday, despite opposition from gay-rights groups and some businesses. Some conservative and religious groups support the bill.

The measure's intention is to protect those who believe that marriage should be between one man and one woman, that sexual relations should only take place inside such marriages, and that male and female genders are unchangeable.

The law allows churches, religious charities and privately held businesses to decline services to people violating those beliefs. Individual government employees may also opt out, although the measure says governments must still provide services.

Other states have considered similar legislation