The US state of West Virginia is debating a bill which could allow discrimination against gay people.

The bill, which has been opposed by AT&T and Dow Chemical, could also impact the state’s economy, reports the Associated Press.

The bill would allow people in the state to challenge a governmental body which may have instructed them to abide by local ordinances or state laws.

Those with religious beliefs would be able to utilise the law.

The examples given by supporters of the law suggest that it would protect bakeries from having to bake a cake with “ISIS” written on it.

However those opposed have said the equivalent law in Indiana, passed in 2015, could cost West Virginia millions of dollars, and that it would enable people to use the law to justify discrimination against LGBT people.

The Religious Freedom Restoration Act was passed last March in Indiana to widespread criticism, and the threat of boycotts by major corporations.

It was subsequently estimated that RFRA had cost Indiana more than $60 million.

The West Virginia law, similar to its Indiana equivalent, was condemned by big businesses.

“Legislation that would permit discrimination against any of our employees or customers conflicts with our core values,” said AT&T spokesman Daniel Langan.

The legislation has passed in the House, and will go to the Senate soon.