The battle between North Carolina’s Republican-dominated General Assembly and its Democratic Gov. Roy Cooper has centered, in large part, around the judiciary. The GOP knows that many of its efforts to consolidate power are unlawful, and the courts have not hesitated to block legislative overreach. In response, North Carolina Republicans are attempting to simultaneously hobble the courts and pack them with partisans. Legislative Republicans are close to passing two bills that would strip Cooper of the authority to appoint many judges, delegating that task to the General Assembly instead. And they have already passed a bill shrinking the state Court of Appeals from 15 judges to 12—a brazen effort to prevent Cooper from filling the vacancies left by three Republican judges set to step down during his term. Cooper vetoed the bill, but the legislature will soon enact the measure through veto override.

On Monday, however, one of these judges took a stand against the GOP’s chicanery, resigning in protest of the bill targeting the Court of Appeals. Judge J. Douglas McCullough, a Republican, will reach the mandatory retirement age of 72 next month, requiring him to step down. At that point, the General Assembly will almost certainly have overridden Cooper’s veto, preventing him from appointing McCullough’s successor. So McCullough stepped down on Monday, allowing Cooper to appoint John Arrowood to replace him. Arrowood is a well-respected Democratic attorney who briefly sat on the Court of Appeals a decade ago. He is the court’s first openly gay member.

In an interview with the Raleigh News & Observer, McCullough explained that the GOP bill would unduly burden the court by increasing the judges’ workload. (Most cases are heard by three-judge panels; on a smaller court, each judge would have to hear more cases.) He also pointed out that a 12-member court can be deadlocked on those rare, usually significant cases that are heard by the full court. But his key concern seemed to be GOP’s assault on his court. In his interview, McCullough fondly recalled the era when Republican Gov. Jim Martin governed North Carolina alongside a Democratic-controlled General Assembly. In those days, McCullough noted sharply, the legislature “did not interfere with [the governor’s] power to make appointments to the judiciary.”

McCullough is a Republican and a conservative; he is no Democratic sympathizer. But it’s notable that the North Carolina GOP’s attack on the judiciary has so alienated him that he would rather let a Democrat replace him—as will happen under current law—than be complicit in Republicans’ scheme. In its quest for total domination over state politics, the General Assembly is driving away even its former allies. McCullough deserves credit for taking a stand against its ongoing legislative coup.