RALEIGH, N.C. — Repealing North Carolina's law limiting LGBT protections at the close of a bitter election year was supposed to heal blows to the economy and perhaps open a truce in the culture wars in at least one corner of the divided United States.

The failure of state lawmakers to follow through instead shows how much faith each side has lost in the other, as Americans segregate themselves into communities of us and them, defined by legislative districts that make compromise unlikely.

The deal was supposedly reached with input from top politicians and industry leaders: Charlotte agreed to eliminate its anti-discrimination ordinance on the condition that state lawmakers then repeal the legislation known as House Bill 2, which had been a response to Charlotte's action.

But bipartisan efforts to return both the city and state to a more harmonious past fell apart amid mutual distrust, and neither side seemed to worry about retribution in the next election.

With GOP map-drawers drawing most legislative districts to be uncompetitively red or blue, politicians see little downside to avoiding a negotiated middle-ground. And since the day Republicans passed and signed it into law last March, HB2 has reflected these broad divisions in society.

The failed repeal shows the same polarization, said David Lublin, a Southern politics expert in American University's School of Public Affairs.

North Carolina had been "seen as the forefront of the new South," focusing on education and economic development, and wasn't "viewed as crazy-right wing or crazy-left wing," Lublin said. Keeping the law in effect, he said, "reverses that impression."

It was always more than just a "bathroom bill."

Republican lawmakers commanding veto-proof majorities framed HB2 as a rebuke to the values of Charlotte and other urban, white-collar communities where Democrats are clustered and where gay, lesbian, bisexual and transgender people generally find support.

HB2 — which omits these people from state anti-discrimination protections, bars local governments from protecting them with their own ordinances, and orders transgender people to use facilities that match their birth certificates — created a backlash that has cost the state's economy millions.

Corporations, entertainers and high-profile sporting events backed out to avoid being seen as endorsing discrimination. Two-thirds of North Carolina voters surveyed in November's Associated Press exit poll said they oppose the law, and even Trump's supporters narrowly trended against it.

IBM executives worry that the failure to repeal HB2 is an obstacle to attracting the best employees to its largest North American operation, in Research Triangle Park outside Raleigh, home to an outsized number of college graduates from around the world.

"The state of North Carolina has a tremendous amount to do to recover its reputation as a great place to live, work and do business," IBM chief diversity officer Lindsey-Rae McIntyre said in an interview Thursday. "Our position is that we will fight this, that we are deeply committed to hiring the very best, diverse talents and that this law and this mindset does nothing to fuel our commitment to hiring that talent."

Across the divide, supporters of HB2 express anger against what they feel are challenges to their religious freedoms, and fear that women could be endangered by transgender people in public bathrooms and showers.

"As much as North Carolina's 'reputation' may have been harmed in the eyes of some, just as many — if not more — respected us for the stance we took in support of privacy and security protections of our public restrooms and dressing facilities," said GOP state Rep. Chris Millis, whose district covers all or parts of two largely rural, coastal counties where President-elect Donald Trump beat Hillary Clinton by a margin of more than 2-to-1.

The divide cuts both ways in the legislature.

Rep. Cecil Brockman represents a heavily Democratic district in urban Guilford County, where voters chose Barack Obama over Mitt Romney in 2012 by nearly a 4-to-1 margin. Brockman, who publicly identifies as bisexual, pleaded with his colleagues to repeal what he called an "offensive, disastrous" law.

Brockman's district is about to change.

After Republicans were accused of unlawfully clustering black voters to diminish their influence, a federal court panel ruled that about a sixth of the state's 170 legislative districts were illegally drawn. The judges ordered North Carolina lawmakers to redraw districts by March 15 and to hold new elections in November.

If lawmakers don't resolve it somehow, HB2 is likely to be a hot-button issue in those elections, although even the most one-sided districts are unlikely to change enough to unseat Republican majorities in the evenly divided state.

Polls show Republican Gov. Pat McCrory's support for the law played into his loss — by about 10,000 votes out of 4.7 million cast — to Democratic Gov.-elect Roy Cooper, who ran in part on repealing HB2.

Republican legislative leaders and Cooper, who appears to have had a significant role in brokering the deal that ultimately collapsed, are still hopeful that a solution can be reached in 2017. The General Assembly, with newcomers elected last month, begins in less than three weeks.

"I certainly believe that negotiations will resume, and frankly we all know that we have to work through this," House Speaker Tim Moore told the AP in a phone interview Thursday, but "an issue with strong social overtones is always a problematic vote for members."

Follow Gary D. Robertson on Twitter at http://twitter.com/garydrobertson and Emery P. Dalesio at http://twitter.com/emerydalesio. Dalesio's work can be found at http://bigstory.ap.org/content/emery-p-dalesio.