Roy Cooper, North Carolina's Democratic governor, on Thursday signed a compromise deal to repeal House Bill 2, despite loud objections from LGBT advocates.

Announced late Wednesday, the bill sailed through the Senate (32-16) and House (70-48) and was headed to Cooper's desk by mid-afternoon Thursday.

Cooper, who campaigned on a pledge to repeal House Bill 2, announced at a news conference that he had signed the bill, saying that it was “the best deal we could get.”

“In a perfect world, we would have repealed HB2 today and added full statewide protections for LGBT North Carolinians,” Cooper said. “Unfortunately, our supermajority Republican legislature will not pass these protections. But this is an important goal that I will keep fighting for.”

House Bill 2 was approved last year during a one-day special session. It blocks cities from enacting LGBT protections and prohibits transgender people from using the bathroom of their choice.

The compromise bill approved Thursday, House Bill 142, repeals House Bill 2, but it also leaves bathroom regulation to the state and enacts a moratorium on local LGBT ordinances until December 1, 2020.

Chad Griffin, president of the Human Rights Campaign (HRC), bristled at Cooper's suggestion that the law had been repealed.

“.@RoyCooperNC taking credit for repealing #HB2. He did no such thing. Instead he signed [a] new version of #HB2 and betrayed [a] campaign promise,” Griffin tweeted soon after Cooper's announcement.

Lawmakers were facing a Thursday deadline from the NCAA to repeal House Bill 2. The NCAA had said that North Carolina would lose championship events through 2022 if the law was not repealed. NCAA President Mark Emmert said that a decision on whether the new law meets that requirement will come next week.