JACKSON, Miss. -- Mississippi's governor signed a law on Tuesday 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, despite opposition from gay-rights groups and some businesses who say it enables discrimination. Some conservative and religious groups support the bill.

The measure's stated 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.

Get Breaking News Delivered to Your Inbox

"This bill merely reinforces the rights which currently exist to the exercise of religious freedom as stated in the First Amendment to the U.S. Constitution," the Republican governor wrote in a statement posted to his Twitter account.

I have signed House Bill 1523. Full statement: pic.twitter.com/00DbgQADFt — Phil Bryant (@PhilBryantMS) April 5, 2016

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

"This bill does not limit any constitutionally protected rights or actions of any citizen of this state under federal or state laws," Bryant said. "It does not attempt to challenge federal laws, even those which are in conflict with the Mississippi Constitution, as the Legislature recognizes the prominence of federal law in such limited circumstances."

Other states have considered similar legislation. North Carolina enacted a law, while governors in Georgia and South Dakota vetoed proposals.

Bryant acted within hours of receiving the bill after it cleared its final legislative obstacle Monday, even as opponents tried to marshal pressure to persuade Bryant to reject it.

CBS affiliate WJTV reports that the American Civil Liberties Union released this statement after Bryant signed the bill:

"This is a sad day for the state of Mississippi and for the thousands of Mississippians who can now be turned away from businesses, refused marriage licenses, or denied housing, essential services and needed care based on who they are. This bill flies in the face of the basic American principles of fairness, justice and equality and will not protect anyone's religious liberty. Far from protecting anyone from 'government discrimination' as the bill claims, it is an attack on the citizens of our state, and it will serve as the Magnolia State's badge of shame."