RALEIGH, N.C. (Reuters) - North Carolina’s Republican-controlled legislature on Wednesday rejected a bid to repeal a state law restricting bathroom access for transgender people, which has drawn months of protests and boycotts by opponents decrying the measure as discriminatory.

A one-day special legislative session ended abruptly after the state Senate voted against abolishing a law that has made North Carolina the latest U.S. battleground over lesbian, gay, bisexual and transgender (LGBT) rights.

The repeal legislation was rejected 32-16, leaving the bathroom restrictions in place statewide. The rejection followed Republican-led political maneuvering that tied repeal to a second provision that would have temporarily banned cities from affirming transgender bathroom rights.

Democratic Senator Jeff Jackson said the repeal effort failed because Republicans reneged on their deal to bring the measure to a floor vote with no strings attached.

The moratorium on municipal bathroom regulations, described by Jackson as a “poison pill,” withered Democratic support, and in the end all 16 Senate Democrats joined 16 Republicans in voting against repeal. Another 16 Republicans voted for it.

The Senate then adjourned without acting on the temporary municipal ban. The state’s House of Representatives had already called it quits.

Democratic Governor-elect Roy Cooper accused Republican leaders of back-peddling on an agreement ironed out in lengthy negotiations. He said both chambers had the votes for a full repeal, but divisions within the Republican Party killed it.

Slideshow ( 9 images )

“The Republican legislative leaders have broken their word to me, and they have broken their trust with the people of North Carolina,” he said.

Senate Republican leader Phil Berger earlier defended the proposal to link repeal with temporary municipal restrictions as a genuine attempt at compromise, citing “the passion and disagreement surrounding this issue.”

After the vote, outgoing Republican Governor Pat McCrory blamed “well-funded left-wing interest groups” that he said “sabotaged bipartisan good faith agreements for political purposes.”

BACKLASH OVER BATHROOM RESTRICTIONS

Earlier in the week, McCrory had called the special session to consider scrapping the law, which passed in March and made North Carolina the first state to bar transgender people from using public restrooms that match their gender identity.

Supporters of the statute, known as House Bill 2 (HB 2), have cited traditional values and a need for public safety, while opponents called it mean-spirited, unnecessary and a violation of civil liberties.

Slideshow ( 9 images )

The national backlash was swift and fierce, leading to boycotts that have been blamed for millions of dollars in economic losses for the state as events, such as business conferences and the National Basketball Association’s 2017 All-Star Game, were moved out of North Carolina.

The pushback contributed to McCrory’s razor-thin defeat in a fall re-election bid against Cooper, an opponent of the law.

HB 2 was enacted largely in response to a local measure in Charlotte that protected the rights of transgender people to use public bathrooms of their choice.

The Charlotte City Council on Monday repealed its ordinance as a prelude to the state repealing HB 2.

Civil liberties and LGBT rights groups condemned the outcome, accusing the legislature of breaking its promise to do away with HB 2.

“It is a shame that North Carolina’s General Assembly is refusing to clean up the mess they made,” said James Esseks, an American Civil Liberties Union executive.

The North Carolina Values Coalition hailed the legislature for upholding the law and refusing to give in to “demands of greedy businesses, immoral sports organizations or angry mobs.”