After a toxic election campaign, the veto-proof Republican majorities in the State House and State Senate moved to defang Mr. Cooper even before he took office. A special session in December stripped the governor of most power to appoint state employees and university trustees, choose a cabinet without legislative approval and install majorities on state and local election boards. The latter move was stayed, pending a trial.

Now the legislators are taking aim at the state judicial system. In December, after voters elected a Democratic majority to the nominally nonpartisan State Supreme Court, the legislature expanded the jurisdiction of the Republican-led Court of Appeals and made the legal path toward other Supreme Court hearings more tortuous. Last month, Republicans voted to shrink the Court of Appeals by barring replacement of the next three retiring judges, denying Mr. Cooper a chance to nominate successors.

In March, a state commission charged with improving the state’s courts urged the legislature to scrap the requirement that judges win election to the bench, saying it forced candidates to seek contributions from people who appeared before them.

Eight days later, the legislature voted to change lower-court elections from nonpartisan to partisan affairs, requiring nearly 400 judges to run under party labels in a bid to put more Republican loyalists on the bench. (The legislators had earlier made appeals and Supreme Court elections partisan.) Two Republican legislators filed a bill to split Charlotte’s Democratic-leaning Mecklenburg County judicial district into three new ones that would give Republicans a better shot at victory.

“It’s straight-up political,” one of the sponsors, Senator Jeff Tarte of suburban Charlotte, told The News & Observer of Raleigh.

Other Republican-sponsored bills would rescind Mr. Cooper’s authority to fill most judicial vacancies, give political parties a role in filling others and change the composition of special three-judge panels, established to hear challenges to laws, that frequently have ruled against the legislature.

“What is the future for an independent judiciary in the state of North Carolina should all these bills become law?” asked State Representative Joe John, a Democrat who sat on the Court of Appeals from 1993 to 2001. “It sure doesn’t look very good.”