North Carolina lawmakers on Wednesday failed to reach a deal to repeal a divisive and costly law restricting protections for transgender people, ending a daylong special session without coming to agreement on anything.

After the North Carolina House adjourned without making a decision, the state's Senate voted down the motion to repeal the controversial so-called "bathroom bill."

That means no end in sight for a crisis that has already helped oust the sitting governor and triggered a boycott of the state by businesses, performers and sports leagues that has cost North Carolina tens of millions of dollars.

Related: Corporate Boycotts Become Key Weapon in Gay Rights Fight

Lawmakers walked away after hours of debate in public and behind closed doors with flocks of protesters crowding the statehouse, most of them seeking the law, known as House Bill 2 or HB2, to be killed off. Their day ended in disappointment.

As the debate in the North Carolina Senate began to spiral, the crowd reacted.

"Do what you said you would do," a member of the audience yelled. The larger audience chanted "shame" as the North Carolina Senate adjourned.

Gov.-elect Roy Cooper accused the Republican-led legislature of failing to fulfill their promise. "I’m disappointed for the people of North Carolina — for the jobs that people won’t have," Cooper said. "I’m disappointed that we did not remove the stain on our great state."

The lack of resolution is a blow to Cooper, the Democratic attorney general who campaigned against the law. After narrowly defeating Republican Gov. Pat McCrory, Cooper worked to broker a deal between the Republican-led legislature and the city of Charlotte, whose ordinance expanding LGBT protections in February prompted the law.

"The Charlotte city council held up their end of the deal by repealing their ordinance," Cooper said. "When it came time for Republican legislative leaders to do their job, they failed."

Earlier this week, the Charlotte city council voted to repeal its ordinance, based on what they thought was a guarantee that Republicans in Raleigh would then repeal HB2. But some GOP members balked, saying a city should not be allowed to dictate when the legislature be called into session.

The breakdown in talks came when Republican leadership said they would only repeal the bill if they also passed a moratorium or "cooling off period" that prohibited local governments from regulating employment practices, public accommodations or access to restrooms, showers or changing facilities.

"This moratorium that sprung up in the final hours doubles down on discrimination for an indefinite period of time," Cooper said.

A sign next to the men's bathroom inside Malaprop's Bookstore/Cafe in Asheville, North Carolina denounces North Carolina's HB2 legislation on June 21, 2016. Jacob Biba / The Washington Post via Getty Images

The state law was passed in a rushed session of the General Assembly last March in response to an ordinance adopted in Charlotte that granted transgender people the right to use bathrooms according to the gender with which they identified.

HB2 prevented local governments from passing ordinances that prohibited discrimination in public places based on sexual orientation and gender identity, nullifying the Charlotte measure and any others like it.

Republican sponsors of HB2, including Gov. Pat McCrory, a former Charlotte mayor who was up for re-election, said they were moving to protect the safety of women and children, arguing they could be assaulted by predators lurking in women's bathrooms.

The bill also prevented local governments from raising the minimum wage.

The backlash began immediately, first in the form of demonstrations, then with the boycotts.

Protestors gather across the street from the North Carolina state legislative building as they voice their concerns over House Bill 2, in Raleigh, N.C., May 16, 2016. Al Drago / CQ-Roll Call via Getty Images

Television producers backed out of filming in the state. PayPal cancelled plans to open a new facility there. Bruce Springsteen and Pearl Jam, along with other popular performers, canceled scheduled shows. The NCAA and ACC moved championship basketball games. The total cost has been estimated to be in the tens of millions of dollars.

The Obama administration joined the opponents, filing a lawsuit that said HB2 violated federal civil rights laws.

McCrory, meanwhile, fiercely defended the law, saying the opposition was being fanned by outsiders and calling the protests political theater. It became a campaign issue, with his Democratic challenger, Attorney General Cooper, standing against HB2.

Republican leaders said they would not repeal the law unless Charlotte backed down first. Both sides refused to budge.

After Cooper beat McCrory in a tight election, the governor-elect worked to broker a solution.

It came together this week, when the Charlotte City Council repealed its pro-LGBT ordinance. Cooper called for a special session of the legislature to repeal HB2, saying he expected the Republicans to keep their word.

A unisex sign and the "We Are Not This" slogan are outside a bathroom at Bull McCabes Irish Pub on May 10, 2016 in Durham, N.C. Sara D. Davis / Getty Images

But as Wednesday's session approached, Republicans complained that Charlotte had not eliminated all provisions of its February 22 ordinance. And so, on Wednesday morning, just before lawmakers were set to meet, the council held an emergency meeting to eliminate the entire ordinance.

"Now the city’s non-discrimination policy is the same version passed in 1968," city spokeswoman Kate Luck said.

Many Republicans said they still support HB2.

"No economic, political or ideological pressure can convince me that what is wrong is right," Lt. Gov. Dan Forest said in a statement early Wednesday. "It will always be wrong for men to have access to women's showers and bathrooms. If HB2 is repealed, there will be nothing on the books to prevent another city or county to take us down this path again."

Charlotte's city council said in a statement that it still stood with LGBT rights, and would try to find ways to grant protections.

But how they would accomplish that remained unclear.

"Charlotte shouldn’t have had to repeal its ordinance in exchange for H.B. 2 to be repealed," Simone Bell, the southern regional director for Lambda Legal, said in a statement. "LGBT people in North Carolina still need protection from discrimination. The right action is for the North Carolina Legislature to pass a statewide comprehensive civil rights bill that includes full protections for LGBT people.”