RALEIGH, N.C. — After more than nine hours of closed-door meetings, jawboning and complicated legislative stratagems, North Carolina legislators went home in frustration Wednesday after failing to repeal the state law that has prompted economic boycotts, lawsuits, political acrimony and contributed to the defeat of the Republican governor.



Republicans, who control both houses of the legislature, could not agree on a way to repeal the law, commonly known as House Bill 2. The legislation curbs legal protections for lesbian, gay, bisexual and transgender people, and requires transgender people in public buildings to use the bathroom that corresponds with the gender on their birth certificate.



The failure to reach a deal in a one-day special session, even after Charlotte, the state’s largest city, fully repealed the ordinance that set the law in motion, was yet another moment of political dysfunction in a state that has become accustomed to it. The session comes just days after Republicans stripped significant powers from Governor-elect Roy Cooper, a Democrat, who is to be sworn in on New Year’s Day.



It also foreshadowed what could be four acrimonious years of governance here.

“We came here to solve a problem that apparently nobody had any clear idea as to how it was going to be solved,” said Senator Daniel T. Blue Jr., the chamber’s Democratic leader. “It’s one thing if, during the regular session, we waste time and do this kind of stuff.”