People in the gallery chanted "shame" as the gavel came down about 7:30 p.m. and lawmakers headed home. They'll meet again January 11 for a regular session of the General Assembly, at which time they might discuss repeal again.
For now, House Bill 2 stands as the law in North Carolina.
Signed by the governor in March
, HB2 bans people from using public bathrooms that don't correspond to their biological sex as listed on their birth certificates. Backlash against HB2 caused huge economic losses for the state, such as businesses canceling plans to expand and the NBA moving its all-star game from Charlotte to another city.
Accusations about what happened broke down along party lines.
Senate Leader Phil Berger, a Republican, put a statement on his website
blaming Gov.-elect Roy Cooper, a Democrat, and Senate Democrats.
"Their action proves they only wanted a repeal in order to force radical social engineering and shared bathrooms across North Carolina, at the expense of our state's families, our reputation and our economy," Berger said.
Berger said Cooper instructed Senate Democrats to vote against the bill, something Cooper denied at a news conference.
"There was an agreement among everybody. That's why we called a special session," Cooper said.
"They said they had the votes as long as we had the Democrats. We got the Charlotte City Council to take this step, something they didn't particularly want to take. ... What happened is they broke the deal."
The Charlotte vote
The state law was passed in response to a Charlotte city "nondiscrimination ordinance" that allowed transgender people to use bathrooms that correspond with their gender identity.
But on Monday, the City Council there rescinded its nondiscrimination ordinance
-- apparently in exchange for a special session by the legislature to repeal HB2. Cooper said he got input from Republicans, the NBA and business leaders in putting together plans for the session.
But the repeal action in the Republican-dominated House and Senate was not to the liking of Democrats or opponents of HB2.
Senate Bill 4, called "Repeal HB2,"
was filed by Republican leadership Wednesday afternoon.
It would have imposed a six-month moratorium on any local government that wants to "enact or amend an ordinance regulating employment practices or regulating public accommodations or access to restrooms, showers, or changing facilities."
The moratorium could be renewed again and again, essentially making it impossible for cities to pass nondiscrimination laws, said state Rep. Chris Sgro, a Democrat and an openly gay legislator.
"It's going to continue discrimination," Sgro said. "We had better see a clean repeal bill if we are going to actually clean up the mess that these folks have made in the state of North Carolina."
Later the bill was amended to extend the moratorium -- called a "cooling off period" -- until after the end of the 2017 General Assembly.
But there were not enough votes to approve the bill and after meeting for nine hours the legislators called it quits.
Political, economic fallout
North Carolina Gov. Pat McCrory, a Republican, said in a statement, "As promised, I called a special session to reconsider a manufactured political issue that strategically targeted the city of Charlotte and our state by well-funded left-wing interest groups. This was at least the third time that pressure from the left sabotaged bipartisan good faith agreements for political purposes."
McCrory blamed his gubernatorial defeat last month to Cooper on controversy over the bathroom bill. He said he'd always advocated a repeal of the "overreaching Charlotte ordinance."
In the nine months since McCrory signed HB2, the state has grappled with wide-ranging repercussions.
The Justice Department filed a suit challenging the measure
, and the state's public university system pledged to defy the statewide law.
North Carolina also suffered huge economic losses after HB2's passage.
Singers Bruce Springsteen, Demi Lovato and Nick Jonas, as well as bands such as Pearl Jam and Boston, canceled concerts in the state.
PayPal and Deutsche Bank both said they would cancel plans to expand into the state.
And the NCAA said it would relocate several college athletic championship events for the 2016-17 season that were scheduled to take place in North Carolina.
'Our best chance'
Simone Bell, southern regional director at Lambda Legal, said in a statement issued with the ACLU of North Carolina
: "As long as HB2 is on the books, thousands of LGBT people who call North Carolina home, especially transgender people, are being discriminated against and will never feel safe."
The NC Values Coalition
said the legislature got it right: "We are thankful for the members of the General Assembly who stood up for what is right, and represented the will of voters by stopping the move to cower and cave in to the city of Charlotte and the Human Rights Campaign."
Cooper said the failure will color his relations with the General Assembly, in which Republicans hold supermajorities.
The legislature recently stripped the governor
of many powers with a law that removes state and county election boards from Democratic control, slows legal battles' path to the state Supreme Court -- where a majority of justices were appointed by Democrats -- and makes the state Supreme Court elections partisan rather than nonpartisan.
Cooper said he'll keep trying to reduce the effects of HB2 and bring businesses and sporting events back to the state.
"This was our best chance," he said. "It cannot be our last chance."