The southern US state of Arizona has passed a law allowing businesses to refuse to serve gay people if homosexuality is against their religious beliefs.
After sailing through the state legislature, the law is awaiting final confirmation from its governor, Jan Brewer, who has gained a reputation for her right-leaning stance on sensitive social issues.
Arizona is the only state to have passed such a law. It says that any obligation to serve homosexuals is a violation of religious freedom if someone's beliefs tell them that homosexuality is wrong.
If Mrs Brewer, a Republican, signs the legislation it will mean, for example, that restaurants could legally turn away homosexual couples or individuals seeking a meal, or a baker could refuse to bake a cake for a gay commitment ceremony. It was not clear how a customer's sexual orientation would be established.
The new law provoked outrage from homosexual groups and prompted the Democratic Party to declare it "state-sanctioned discrimination" and an embarrassment. Both sides claim they are protected by constitutional rights, so the issue may end up being settled by the courts.
Anna Tovar, the Democratic Party leader in the Arizona state senate, said: "With the express consent of Republicans in this legislature, many Arizonans will find themselves members of a separate and unequal class under the law because of their sexual orientation. [The law] permits discrimination under the guise of religious freedom."
Steve Yarborough, a senate Republican, argued: "This is not about allowing discrimination it's about preventing discrimination against people who are clearly living out their faith."
Seven other Republican-dominated states, including Ohio, Idaho and Tennessee, have tried to introduce similar Bills but they have all failed or stalled.
A similar Bill in Kansas was blocked earlier this month when Republicans in the state legislature sided with opposition Democrats, arguing that the law amounted to legalising discrimination.