(Reuters) - North Carolina Republican lawmakers said late on Wednesday they had reached a deal to repeal the state’s controversial law prohibiting transgender people from using restrooms in accordance with their gender identities.

A sign protesting a North Carolina law restricting transgender bathroom access. REUTERS/Jonathan Drake

The compromise, reached with Democratic Governor Roy Cooper and set to go before the legislature for a vote Thursday morning, would still ban local municipalities, schools and others from regulating bathroom access.

It would also effectively forbid cities from offering their own job and restroom protections to vulnerable groups for nearly four years.

“Compromise requires give and take from all sides, and we are pleased this proposal fully protects bathroom safety and privacy,” the state’s top Republican lawmakers, Senate leader Phil Berger and House of Representatives Speaker Tim Moore, said in a statement released late Wednesday.

The pair announced the deal at an impromptu news conference.

The compromise with Cooper, a staunch opponent of the bathroom law, was reached hours before the state was reportedly set to lose its ability to host any NCAA basketball championships.

The college athletic association is one of numerous organizations to sanction or boycott North Carolina in the wake of the law’s passage last year.

Cooper said earlier this week that the measure could end up costing the state nearly $4 billion.

He said he supported the compromise. “It’s not a perfect deal, but it repeals House Bill 2 and begins to repair our reputation.”

But it remained unclear whether the compromise would be acceptable to those who believe North Carolina was unfriendly to the rights of gay, lesbian, bisexual and transgender people.

In an impassioned news conference before the deal was announced, several leading LGBT activists decried its provisions, including the bar on municipalities regulating employment practices and “public accommodations”.

“This is a dirty deal,” said Chad Griffin, president of the Human Rights Campaign. He vowed to continue fighting North Carolina in court and in the public sphere if the new measure passes and is signed by Cooper.

On Twitter Wednesday night, San Francisco-based Levi Strauss & Co., which has publicly opposed North Carolina’s transgender bathroom law, urged lawmakers to reject what it called a “backroom” deal.

(This version of the story corrects Griffin quote in paragraph 12, replacing “bill” with “deal”)