The NCAA’s opposition to HB2 was seen as an impetus for its attempted repeal. (Streeter Lecka/Getty Images)

North Carolina’s Republican-controlled legislature and the state’s Democrat governor reached an agreement Wednesday night to repeal House Bill 2, the widely decried state law that mandates transgender people use the bathroom corresponding with their birth gender in state-run facilities and bans North Carolina municipalities from enacting anti-discrimination policies.

Both houses of the General Assembly voted to approve the new bill Thursday, and Gov. Roy Cooper is expected to sign it into law.

But whether the proposed repeal meets the standard for the NCAA and other sports organizations to return their events to North Carolina remains unclear. The NCAA, which has given the state a Thursday deadline to repeal the law, has yet to comment on it. An email to an NCAA spokeswoman who previously had issued the organization’s statements on HB2 was not immediately returned.

Opposition from the NCAA was seen as a main impetus for North Carolina to repeal HB2, and it’s no coincidence that the state legislature is taking action at this particular point. Citing the discriminatory nature of the law, the NCAA moved seven championship events out of the state this academic year, including first-round men’s basketball tournament games that were moved from Greensboro, N.C., to Greenville, S.C. This week, it began making championship site selections for the years 2018 through 2022 and has threatened to maintain the North Carolina ban unless HB2 is repealed. According to the Raleigh News & Observer, North Carolina submitted 133 bids for NCAA events from 2018 to 2022, with an estimated economic impact of at least $250 million.

The NBA also moved this season’s All-Star Game from Charlotte to New Orleans. In October, NBA Commissioner Adam Silver said returning the game to Charlotte in 2019 is “a high priority” for the league, though it all depended on what the state did to alleviate concerns over HB2.

All told, the Associated Press has estimated that the state stands to lose at least $3.76 billion over 12 years if the law is not repealed, from organizations moving events away from the state, entertainers boycotting North Carolina’s stadiums and companies that decide to send jobs elsewhere.

The proposed law that would replace HB2, called HB142, exempts schools from state bathroom regulations but keeps in place the ban on anti-discrimination laws until December 2020, when the law expires. It was hailed as a compromise by its authors but decried by others, on both sides of the aisle.

“The initiative is not a repeal,” Chris Sgro, executive director of Equality NC, told CNN. “It’s doubling down on the discrimination that HB2 exacts — it’s HB2.0. It doesn’t allow municipalities to protect people from discrimination till 2020.”

Said State Sen. Ralph Hise, a Republican who opposed the new bill: “Basketball is important to North Carolina, nobody is going to deny that. But we’ve been threatened as a state and we took the coward’s act and we’re backing down. I can’t stand for that.”

The NCAA previously had outlined its opposition to HB2. Whether the new law meets this criteria remains to be seen, though many of the discriminatory measures listed below would remain in place under the new law.

NCAA President Mark Emmert is scheduled to meet with reporters at the men’s basketball Final Four at 6:30 p.m. EDT.

“Last year, the NCAA Board of Governors relocated NCAA championships scheduled in North Carolina because of the cumulative impact HB2 had on local communities’ ability to assure a safe, healthy, discrimination free atmosphere for all those watching and participating in our events. Absent any change in the law, our position remains the same regarding hosting current or future events in the state,” the NCAA said in a statement emailed to The Post last week. “As the state knows, next week our various sports committees will begin making championships site selections for 2018-2022 based upon bids received from across the country. Once the sites are selected by the committee, those decisions are final and an announcement of all sites will be made April 18.”

The NCAA has condemned similar laws in other states. After Indiana, where the NCAA is headquartered and a state that has hosted numerous Final Fours, passed a law in 2015 that would have allowed businesses to refuse to serve gay customers in the name of religious beliefs, Emmert spoke out against it. The state then passed an amendment to the law saying it cannot be used to discriminate based on sexual orientation and gender identity.