A religious freedom bill described by opponents as being discriminatory against same-sex couples passed the Georgia state legislature on Wednesday night in an 11th hour vote ahead of the session’s close.

The legislation, dubbed the Religious Liberty Bill, still has to be signed by Georgia’s Republican Governor Nathan Deal to become law. Deal has made clear that he will not sign a bill that allows discrimination, but his office did not immediately respond to request for comment on Wednesday night.

ADVERTISEMENT

Similar bills in states like Indiana and Arkansas sparked storms of criticism last year, forcing many lawmakers to retreat from the provisions.

The Georgia bill, reworked several times by lawmakers amid criticism that earlier versions went too far, declares that no pastor can be forced to perform a same-sex wedding.

The bill also grants faith-based organizations – churches, religious schools or associations – the right to reject holding events for people or groups of whom they object. Faith-based groups also could not be forced to hire or retain an employee whose beliefs run counter to the organization’s.

Opponents say the bill could be used to deny services and discriminate against same-sex couples.

“The decision by the legislature today was to make an egregious and discriminatory bill even worse,” the Human Rights Campaign, which represents the lesbian, gay, bisexual, and transgender community, said in a statement.

ADVERTISEMENT

“It’s appalling that anti-equality extremists in the legislature are trying to ignore the will of the people of Georgia,” it said.

Mike Griffin, a lobbyist and spokesman for the Georgia Baptist Convention, applauded the bill’s passage. He said that while the bill did not give them everything they wanted, he added: “We feel we’ve advanced our protection of our First Amendment Right to religious freedom.”

“Our rights of religious liberty don’t end inside the four walls of a church,” he said.

ADVERTISEMENT

In a late added amendment, the proposed law says that it cannot allow discrimination already prohibited by federal law, which opponents said could nullify some of its provisions.

More than 300 large corporations and small businesses, including Delta Airlines and Coca Cola have signed a pledge decrying the Georgia legislation and urging the state lawmakers to drop it.

ADVERTISEMENT

The state legislature is set to wrap up its current legislative session on Friday.

(Reporting by Rich McKay in Atlanta; Editing by Curtis Skinner and Michael Perry)