Later this year, North Carolina will probably hold its first truly free and fair election since 2010. It may also be the state’s last.

Over the last few weeks, state and federal courts have issued a series of rulings striking down North Carolina Republicans’ brazen attack on democracy and the franchise. In the most important of these decisions, a federal district court held on Monday that the state’s notorious partisan gerrymander is unconstitutional and should not be used in the 2018 election. Because the U.S. Supreme Court is currently short-staffed, the justices may well split 4–4 on an emergency appeal, compelling Republican legislators to comply with the lower-court order. But once Brett Kavanaugh is confirmed, he would likely provide the fifth vote to lock partisan gerrymandering claims out of federal courts for good. The impending election may thus be North Carolina voters’ best and only chance to end the GOP’s illegitimate entrenchment of power in their state—at least temporarily.

No one seriously argues that North Carolina Republicans did not create a partisan gerrymander when they redrew congressional districts in 2011. The current lines were drawn in 2016 after a federal court invalidated part of the previous map as a racial gerrymander.

(Later, the Supreme Court affirmed that decision, holding that the contested districts violated the Equal Protection Clause.) In response, Republican legislators in charge of redistricting hired a consultant, Tom Hofeller, who helped them draw their earlier unconstitutional map. Alert to the legal perils of carving up the state by race, map-makers decided instead to draw districts along partisan lines. Republicans therefore directed Hofeller to examine “political data” and “make reasonable efforts” to give the GOP a strong “partisan advantage” whenever possible.

It worked. Despite the state’s roughly even split between Democrats and Republicans, GOP candidates won 10 out of state’s 13 congressional seats in the November election. Voting rights advocates filed a new lawsuit on behalf of the state Democratic Party, as well as voters who alleged that the revised map still infringed upon their constitutional rights. In January 2018, a three-judge federal district court agreed, but in June the U.S. Supreme Court sent the case back down after sharpening the standard for who, exactly, has standing to bring these claims in court.

On Monday, the same district court found that both the Democratic Party and individual voters did, indeed, have standing. It then held, once again, that the state’s partisan gerrymander ran afoul of the U.S. Constitution by diluting Democratic votes to dictate the outcome of election. There is abundant evidence that Republicans drew congressional districts with the express purpose of disadvantaging Democrats: One map-maker, Republican Rep. David Lewis, declared, “I think electing Republicans is better than electing Democrats. So I drew this map to help foster what I think is better for the country.” Lewis also admitted that he gave Democrats three seats because he couldn’t figure out how to give them fewer. In addition to these smoking guns, the court examined oodles of data—including mangled districts that split up cities and counties—indicating clear partisan intent.

No one seriously argues that North Carolina Republicans did not create a partisan gerrymander when they redrew congressional districts in 2011.

The court held that this gruesome gerrymander violated the First and 14th Amendments of the Constitution, as well as the Elections Clause. Republicans, the court explained, had diluted the power of Democrats’ votes, acting with “invidious partisan intent” that infringed upon these voters’ equal protection rights. Moreover, Republicans had targeted and punished voters on the basis of their affiliation with the Democratic Party—viewpoint-based discrimination that violates the First Amendment’s free association guarantee. Finally, Republicans exceeded the authority delegated to them by the Constitution to regulate the “times, places, and manner” of congressional elections. GOP map-makers, the court wrote, had not merely regulated the “manner” of these elections; it attempted to “dictate electoral outcomes” by “favoring candidates of one party and disfavoring candidates of another”—an unconstitutional manipulation of “our democratic system.”

This ruling was predictable in light of the court’s January decision, which reached the same conclusions. But it ended with quite a surprise: Although the November election is about 70 days away, the court aimed to have new maps drawn up by then. It noted that Republican legislators have repeatedly proved they cannot be trusted to draw lawful maps and questioned whether they deserve another “bite-at-the-apple.” Still, hesitantly, it asked the Legislature to explain why it should be “afforded an (additional) opportunity to draw a remedial plan.” The court also announced that it will appoint a “special master” to draw an alternative map that the state can use in November if the legislature cannot or will not draw constitutional districts.

Ironically, the court might not have tried to secure a new map for the impending election of North Carolina Republicans hadn’t broken several different laws in order to manipulate the outcome of November’s elections—thereby triggering lawsuits that brought the preparation of ballots to a grinding halt. First, legislators passed a law that stripped state Supreme Court candidate Chris Anglin of his Republican affiliation to protect the GOP incumbent from competition. Anglin sued, and a state court temporarily halted the printing of ballots. The court later blocked the law as unconstitutional.

Days later, a different state court again delayed ballot printing while it considered a challenge to six constitutional amendments that Republican legislators hope to include on the November ballot. These amendments would radically restructure state government, stripping power from the current Democratic governor while suppressing voting rights by hobbling the state election board and mandating voter ID. Opponents say Republicans wrote ballot summaries designed to mislead voters about the nature of the amendments. The court eventually ruled that two descriptions were, indeed, illegally deceptive.

All this tumult has prevented election officials from finalizing, let alone printing, the November ballots. And the federal district court cited this indefinite pause as justification to mandate new districts before the election. “Any order this Court enters impacting the November 6, 2018, election,” the court wrote, “would not seem to impose additional burdens on the State’s electoral machinery.” Put differently, the November ballot is still a work in progress, so the court might as well impose new districts before the dust settles.

Typically, at this point, North Carolina Republicans would file an emergency motion with the U.S. Supreme Court, which would place the district court’s ruling on hold by a 5–4 vote. But right now the court has only eight members, and it’s evenly split between liberals and conservatives. As election law expert and Slate contributor Rick Hasen has pointed out, if the court deadlocks 4–4, the district court order will stand. So long as no liberal justices defect—and there’s a possibility one might, though not a strong one—North Carolina may have fair districts in the 2018 election. (Because ballots must be printed in September, Republicans cannot simply wait until October to appeal.)

But that may prove to be the last gasp of robust, competitive elections in the state. In 2019, SCOTUS will probably hear a proper appeal of the district court’s decision. At that point, if Judge Brett Kavanaugh is confirmed, he will almost certainly join the conservatives to rule that federal courts may not invalidate partisan gerrymanders. Republicans are poised to retain control of the state legislature in 2018 due to a different gerrymander that is only partially fixed. If they do, they may seek to re-implement the old heavily biased congressional maps as quickly as possible, perhaps even in advance of the 2020 election. Put simply, if voters don’t break Republicans’ grasp on their state Legislature, the GOP may wind up regaining its stranglehold on congressional districts.

So, in November, voters will have a chance to oust the Republican legislators who illegally entrenched their own power. They may not get another shot.