Updated

North Carolina's controversial "bathroom bill," which limited people to the public restroom aligned with their gender at birth and prompted a backlash that threatened to hurt the state's economy, was revamped by lawmakers Thursday after a year of contentiousness.

The law sparked a rash of concert, sporting event and business convention boycotts and cost the state millions in revenue. A compromise plan announced Wednesday night by the state's Democratic governor and leaders of the Republican-controlled legislature was worked out amid pressure from the NCAA, which threatened to take away more sporting events.

The deal, which Gov. Roy Cooper urged lawmakers to support, repeals the portion of the year-old law that ties public bathroom use to the gender listed on one's birth certificate. The new measure leaves policy on public restrooms to state legislators -- not local government or school officials.

The compromise deal drew criticism from transgender rights activists who say it still denies them protection from discrimination. It remains to be seen if the deal will satisfy the NCAA and other groups that have steered clear of the Tar Heel state in protest.

Republican Sen. Dan Bishop, a primary sponsor of the original law, denounced the new deal on the Senate floor, where it was approved 32-16, with nine of 15 Democrats among the yes votes.

"This bill is at best a punt. At worst it is a betrayal of principle," the Charlotte-area legislator said.

The House passed the bill 70-48 later in the day.

Republican Rep. Scott Stone, who lives in Charlotte, urged his colleagues to vote for the bill.

"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."

Under the new law, local governments can't pass new nondiscrimination protections for workplaces, hotels and restaurants until December 2020.

That moratorium, according to GOP House Speaker Tim Moore and Senate leader Phil Berger, would allow time for pending federal litigation over transgender issues 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," Berger said. "It is something that I think satisfies some people, dissatisfied 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."

The deal came as the NCAA said North Carolina wouldn't be considered for championship events from 2018 to 2022 unless HB2 was changed. The sports governing body said it would start making decisions on host cities this week and announce them in April.

An Associated Press analysis this week found that the law would cost the state more than $3.76 billion in lost business over a dozen years.

HB2 supporters argued that the law was needed to preserve people's privacy.

The Associated Press contributed to this report