WCNC-TV, Charlotte, N.C.

RALEIGH, N.C. — North Carolina Gov. Roy Cooper announced via Twitter that a compromise had been reached to repeal the state's controversial "bathroom bill."

Late Wednesday, Cooper tweeted, "I support the House Bill 2 repeal compromise." He said the agreement is "not a perfect deal, but it repeals House Bill 2 and begins to repair our reputation.

Earlier, Sen. Phil Berger and House Speaker Tim Moore held a 10:30 p.m. ET press conference to announce that an agreement had been reached, according to WRAL-TV in Raleigh.

House Bill 142 was moved into the Senate Rules Committee Wednesday evening. The bill initially dealt with occupational licensing boards, but will be stripped and replaced.

According to WRAL and WCNC, the bill will go before the Senate Rules Committee at about 9:15 a.m. Thursday, where it must pass. The bill must then pass two additional votes on the Senate floor during a session scheduled for 11 a.m.

Read more:

NCAA warns N.C. to repeal HB2 or no championships through 2022

N.C. leaders say they back HB2 repeal; governor alleges stunt

The bill will then go to the House for a final vote before being sent to Cooper.

The announcement came ahead of a deadline set by the NCAA, which must start making decisions on where to site future collegiate athletic tournaments. The NCAA has said the organization will not hold events in North Carolina as long as HB2 remains law.

HB2 requires transgender people to use bathrooms based on their birth certificate and not by the gender in which they identify. There have been many unsuccessful attempts to repeal the bill since September when the NCAA relocated its championship events because of its inclusive initiative, which came on the heels of the NBA relocating its All-Star game from Charlotte. Despite losing millions from the removal of athletic events and concerts and despite then-Gov. Pat McCrory, who signed the bill, being replaced by Democrat Roy Cooper, the GOP-controlled legislature had not rescinded the bill.

Contributing: Scott Gleason, USA TODAY. Follow WCNC-TV on Twitter: @wcnc