Updated on December 19 at 11:48 a.m. ET

DURHAM, N.C.—Leaders in Charlotte, North Carolina, on Monday voted to repeal a city nondiscrimination ordinance, the first part of a prospective deal that would end in the repeal of HB2, the Old North State’s controversial “bathroom bill.”

The details are still unclear, with a surprise meeting of Charlotte’s city council Monday morning the first public sign that something is afoot. Here’s the general outline: The Queen City has unanimously repealed an ordinance that it enacted in February which banned discrimination against LGBT people and, most controversially, required businesses to allow transgender people to use the bathroom of the gender with which they identify. In turn, the North Carolina General Assembly will reportedly return to Raleigh and repeal HB2, the law it passed in March to overturn the Charlotte rule. If, however, the General Assembly failed to repeal HB2 by December 31, then Charlotte’s ordinance will go back into effect.

“Senator Phil Berger and House Speaker Tim Moore assured me that as a result of Monday’s vote, a special session will be called for Tuesday to repeal HB 2 in full,” Governor-elect Roy Cooper, a Democrat and the current state attorney general, said in a statement. “I hope they will keep their word to me and with the help of Democrats in the legislature, HB 2 will be repealed in full.”

Outgoing Governor Pat McCrory said he would call a special session of the legislature, but blamed Democrats for not completing a similar deal earlier.

There have been rumors of a deal along the same outlines as the one under consideration now for months, involving a mutual disarmament by Charlotte and the General Assembly, but none of them have come to fruition. Particularly staunch opposition has come from some Democrats who opposed a deal for reasons of both politics and policy.

As a matter of politics, repealing HB2 could have been a pre-election boon for Republicans, who rushed the bill into law only to encounter massive resistance, including costly national boycotts, and a negative response to the law statewide. The state law not only overturned local nondiscrimination ordinances, it also dictated that transgender people use the bathroom corresponding to the sex on their birth certificates. In addition, it barred cities in North Carolina from enacting their own minimum wages.

As a matter of policy, opponents of the repeal deal argued that Charlotte would be sending the wrong message by removing its LGBT non-discrimination ordinance, since many cities around the country have similar rules. A mutual-repeal deal would apparently return the state to the status quo ante, which Charlotte’s city council had previously decided was inadequate.

But the Human Rights Campaign and Equality NC, two organizations that have been on the frontline of the HB2 battle, issued statements hailing the deal on Monday. While many North Carolina Democrats were taken by surprise by the deal, the groups had apparently been involved in discussion.

“Governor-elect Cooper has briefed us on a deal he brokered with state lawmakers to reach a complete and total repeal of HB2,” said HRC President Chad Griffin. “It's time for state lawmakers to repeal HB2 and begin repairing the harm this bill has done to people and the damage it has done to North Carolina's reputation and economy."

Chris Sgro, who is executive director of Equality NC and an openly gay state representative, said, “The Charlotte City Council and mayor did the right thing by passing their ordinance—HB2 is wrong. Since its passage, the deeply discriminatory HB2 has hurt our economy and people. Now, the General Assembly must fully repeal HB2 so that we can start the necessary talks for protecting LGBTQ people and bring back businesses across the state.”

The joint statement noted that Charlotte city council opened the door to passing a new nondiscrimination measure once HB2 is repealed. “The City of Charlotte is deeply dedicated to protecting the rights of all people from discrimination and, with House Bill 2 repealed, will be able to pursue that priority for our community,” the council said in a statement.

In November, Governor McCrory, a Republican and former mayor of Charlotte who signed the bill and then became its public face, narrowly lost reelection. Cooper is a moderate, but he was critical of HB2 and refused to defend it in court. The Department of Justice and several civil-rights groups have sued the state over the law. Many artists have boycotted the state, major employers have canceled, postponed, or curtailed employment expansions, and other organizations have withdrawn events from the state—including the 2017 NBA All-Star Game and some NCAA and ACC sports tournaments. Estimates of the cost to the state economy range in the hundreds of millions of dollars.

Seeing the General Assembly return to Raleigh, just days before Christmas, is yet another stunning turn in a busy December in the state. In early December, after weeks of challenges and recount requests, McCrory conceded the governor’s race in early December. Last week, the legislature met for a special session that had been announced as necessary to pass disaster relief for victims of flooding and wildfires. But after a relief bill had been passed, the GOP leaders of both chambers quickly gaveled the session out and then reopened a new special session. The General Assembly then passed a series of measures intended to strip Cooper, the incoming governor, of a range of appointing powers; subject his cabinet appointments to confirmation; and rework state and county boards of election to limit Democrats’ power.

The moves were met with fury by Democrats in the legislature and hundreds of protestors, and brought national condemnation to the state, echoing the HB2 controversy. But with huge GOP majorities in both houses, there was little stopping the bills. McCrory has so far signed one bill, overhauling election rules, but has not yet signed the bill that would limit the governor’s appointment powers.

The new special session seems to offer several risks for the parties involved. Legislators already seemed somewhat peevish about having to be in Raleigh last week, with the holidays nearing. To repeal the law, Republican leaders in the General Assembly will likely have to depend on Democratic votes, while facing dissension from GOP lawmakers who still support the law. Democrats could split between those who think a compromise that eliminates HB2 is best for the state and those who still believe Charlotte is making a mistake by repealing its ordinance. Cooper, for his part, could emerge with a major victory even before he takes office. But he is also risking being humiliated by Republican leaders in the legislature—and by inviting them to come back to Raleigh, he’s offering them another chance to try to undercut him, too.