North Carolina Republican lawmakers and Democratic Gov. Roy Cooper said late Wednesday that they have agreed on legislation to resolve a standoff over the state's "bathroom bill" through a replacement measure that still restricts LGBT nondiscrimination protections.

GOP leaders announced the new legislation would be debated and voted on Thursday—at about 9:15 a.m. ET-- but it was unclear whether there were enough House and Senate votes to pass it.

Cooper, who ran successfully last fall on a platform that included repealing House Bill 2, said in a release that he supported the compromise.

Make no mistake: This newest #HB2 proposal is a bad deal that does not actually #RepealHB2. Instead, it doubles-down on discrimination. — HumanRightsCampaign (@HRC) March 30, 2017

"It's not a perfect deal, but it repeals House Bill 2 and begins to repair our reputation," he said.

Leaders of LGBT rights groups were incensed about the anticipated proposal and vowed political punishment for elected officials who support it.

Chris Sgro, the executive director of Equality NC, told The Charlotte Observer that the proposed deal “would continue to actively discriminate against the LGBT community.”

The late-night work came as the NCAA has said North Carolina sites won't be considered for championship events from 2018 to 2022 "absent any change" in the March 2016 law known as House Bill 2, which it views as discrimination. The NCAA said decisions would be made starting this week on events.

I urge #NCGA & @NC_Governor to finally stick with this deal that still respects privacy and let Supreme Court resolve issue for our nation. — Pat McCrory (@PatMcCroryNC) March 30, 2017

The announcement came after days of “marathon, often contentious negotiations,” The Observer reported.

HB2 has prompted some businesses to halt expansions and entertainers and sports organizations to cancel or move events, including the NBA All-Star game in Charlotte. An Associated Press analysis this week found that HB2 already will cost the state more than $3.76 billion in lost business over a dozen years.

The new proposal would repeal HB2 but would leave state legislators in charge of policy on public multi-stall restrooms. Local governments also couldn't pass ordinances extending nondiscrimination covering things like sexual orientation and gender identity until December 2020. That temporary moratorium, according to House Speaker Tim Moore and Senate leader Phil Berger, would allow time for pending federal litigation over transgender issues to play out.

"Compromise requires give and take from all sides, and we are pleased this proposal fully protects bathroom safety and privacy," Berger and Moore said in a prepared statement.

Moore and Berger made the announcement after several hours of private meetings among lawmakers, with the two shuttling between their corner offices at the Legislative Building. GOP lawmakers and Cooper have been grappling for months over what to do about HB2, which the Republican-controlled legislature passed in response to a Charlotte ordinance that allowed transgender people to use restroom aligned with their gender identity.

Cooper narrowly defeated GOP Gov. Pat McCrory, who signed the law. A potential compromise failed during a special session in December, when Cooper was governor-elect.

Social conservatives want HB2 to remain in place, saying ordinances like the one in Charlotte make it easy for male sexual predators to enter public restrooms designated for the opposite sex.

Anything except a full repeal — nothing else — has drawn opposition from gay rights groups, who responded before the announcement to anticipated provisions in the legislation.

"At its core, it's a statewide prohibition on equality," Human Rights Campaign President Chad Griffin told reporters earlier Wednesday as details of the proposal began surfacing. "Just like we did with ... McCrory, we will hold all elected officials accountable — Democrats and Republicans — who target our community by advancing this statewide ban on nondiscrimination protections."

The Associated Press contributed to this report