North Carolina Republicans on Tuesday abandoned their effort to rig a state Supreme Court race, declining to appeal a ruling that prohibited them from changing the rules to disadvantage a specific candidate.

The tumult over North Carolina’s upcoming state Supreme Court election began in 2017, when the GOP-controlled state legislature abolished judicial primaries. Republican Justice Barbara Jackson is running for reelection in November, and GOP legislators hoped to shield her from competition. At the same time, they assumed multiple Democrats would run against each other in the general election, splitting the progressive vote and giving Jackson a smooth path to victory.

That didn’t happen. Instead, Democrats coalesced around a single candidate, civil rights lawyer Anita Earls. Jackson, on the other hand, drew a Republican challenger: Chris Anglin, a Raleigh attorney. Anglin was a registered Democrat until he filed for the race as a Republican; he calls himself a “constitutional Republican” who wants to “stand up for the independence of the judiciary” and object to “the constant attack” on its status as “a coequal branch of government.” Regardless of whether Anglin is a spoiler, a genuine protest candidate, or both, he played by the rules, and secured a spot on the November ballot as a Republican running against Jackson and Earls.

So Republicans changed the rules. During a hastily called special session, GOP legislators passed a law to strip Anglin of his party affiliation on the ballot. Anglin sued, and a state court blocked the law as a violation of his due process and associational rights under the North Carolina constitution. Speaker of the House of Representatives Tim Moore and President Pro Tempore of the Senate Phil Berger appealed, but an appellate court unanimously declined to reverse the ruling. Rather than appeal to the state Supreme Court—where Democrats currently hold a 4–3 majority—Moore and Berger gave up on Tuesday. In a court filing, they announced that they would drop the appeal “in the interests of allowing” the state elections board “to finalize the content to appear on the ballot” and “avoid unintentionally furthering voter confusion.”

In a statement, Anglin declared that he was pleased his suit exposed “legislative leadership’s naked grab for power,” and hoped “to be a voice for disaffected Republicans” and others concerned about assaults on the judiciary. He has little hope of winning—but because he will be listed as a Republican, he may siphon voters away from Jackson, helping Earls triumph in November. And futile as his candidacy may seem, Anglin appears to have made the point he was seeking to drive home from the start: Politicians who meddle with the judiciary might wind up getting burned themselves.