The compromise plan was worked out under mounting pressure from the NCAA, which threatened to take away more sporting events from the basketball-obsessed state as long as the law, also known as House Bill 2, remained on the books.

RALEIGH, N.C. North Carolina lawmakers rolled back North Carolina's "bathroom bill" Thursday in a bid to end the backlash over transgender rights that has cost the state dearly in business projects, conventions and basketball tournaments.

The compromise plan, announced Wednesday night by the state's Democratic governor and leaders of the Republican-controlled legislature, was worked out under mounting pressure from the NCAA, which threatened to take away more sporting events from the basketball-obsessed state as long as the law, also known as House Bill 2, remained on the books.

The new measure cleared the House and Senate in a matter of hours and was sent to Gov. Roy Cooper, who signed it.

Among other things, it repeals the best-known section of HB2: a requirement that transgender people use the public restrooms that correspond to the sex on their birth certificate.

But the American Civil Liberties Union and gay and transgender activists complained that the new bill still denies them certain protections from discrimination, and they demanded nothing less than full repeal.

As a result, it was unclear whether the retreat from the year-old HB2 would stop the boycotts or satisfy the NCAA. An NCAA spokeswoman didn't immediately respond to a message seeking reaction.

Republican Rep. Scott Stone, who lives in Charlotte, urged his colleagues to vote for the new bill. It passed the House 70-48.

"We are impeding the growth in our revenue, in our ability to do more things for tourism, for teacher pay, while we have this stigma hanging over," Stone said. "The time has come for us to get out from under the national spotlight for negative things. You can't go anywhere on this planet without somebody knowing what is HB2 and having some perception about it."

Conservatives, meanwhile, staunchly defended HB2 and bitterly denounced the new measure.

"This bill is at best a punt. At worst it is a betrayal of principle," Republican Sen. Dan Bishop, a primary sponsor of HB2, said on the Senate floor as the rollback was approved 32-16, with nine of 15 Democrats among the yes votes.

While the new measure eliminates the rule on transgender bathroom use, it also makes clear that state legislators not local government or school officials are in charge of policy on public restrooms.

HB2 had also restricted local governments' ability to enact nondiscrimination ordinances on behalf of gay or transgender people. Under the new measure, local governments can't pass any new protections for workplaces, hotels and restaurants until December 2020.

That moratorium, according to GOP leaders, would allow time for pending federal litigation over transgender rights to play out.

"This is a significant compromise from all sides on an issue that has been discussed and discussed and discussed in North Carolina for a long period of time," Senate leader Phil Berger said. "It is something that I think satisfies some people, dissatisfies some people, but I think it's a good thing for North Carolina."

Gay rights activists blasted the proposal, saying it was not a true repeal.

"It doesn't matter if you are a Democrat or a Republican, if you vote for this bill, you are not a friend of the LGBT community," Equality North Carolina executive director Chris Sgro said. "You are not standing on the right side of the moral arc of history or with the civil rights community."

James Esseks, director of the ACLU LGBT Project, said lawmakers "should be ashamed of this backroom deal." ''This is not a repeal of HB2. Instead, they're reinforcing the worst aspects of the law," he said in a statement.