On Monday, federal judges added a wrinkle to the already highly anticipated upcoming midterm elections when they ruled that North Carolina's districts had been drawn to favor Republicans to such an extent that they are unconstitutional. Not only that, but the court may force the state to redraw those districts before the elections just a little more than two months away, an outcome that would almost certainly favor Democrats.

For years, the the GOP has used its advantage in the North Carolina legislature to seize as much power as it legally could, and redrew districts to advantage Republican candidates, a process known as gerrymandering. (A typical way this works is that the boundaries are placed in such a way to cram as many Democratic voters as possible into one solid blue district, while spreading Republicans out across multiple districts to give GOP candidates races they can easily win.) As a result, though the state is very closely divided between the two parties (Donald Trump won by a little over 3 points in 2016), ten of its US House seats belong to Republicans.

Last year, the Supreme Court ruled that North Carolina's gerrymandering techniques when it came to the state House and Senate were illegal because they deprived minority voters of power, a nasty practice known as "racial gerrymandering." But though the high court was set to consider "partisan gerrymandering"—drawing maps designed to disadvantage voters based on party affiliation rather than race—it dodged the issue earlier this summer and left in place a Texas districting map that some said discriminated against minority voters. (Republicans in North Carolina have openly acknowledged that they've drawn lines that benefit their party; the question is just whether this is illegal.)

Monday's ruling from the Fourth Circuit has suddenly made the issue urgent, however. Judge James A. Wynn Jr. wrote in the decision Monday that "North Carolina voters now have been deprived of a constitutional congressional districting plan—and, therefore, constitutional representation in Congress—for six years and three election cycles.” He added that he was disinclined to give the North Carolina General Assembly another chance to draw a fair map, and, according to the Washington Post, _"_proposed several unusual ideas: appointing a special master to draw new districts, holding general elections without party primaries or even turning the November elections into a primary and holding the general election sometime before the new Congress convenes in January." (What path the court decides to go down is yet to be determined, pending briefs from both sides due Friday.)

With Republicans trying to hold onto their 23-seat lead in the House, every district matters, and a fair redistricting would see them probably lose several spots in North Carolina. A similar ruling on partisan gerrymandering in Pennsylvania (from a state court, as opposed to federal) gave Democrats a big boost in that state earlier this year. But the North Carolina primaries have already happened, making the prospect of redrawing districts (or adding another election to the calendar) seem drastic.

This case will probably head to the Supreme Court, but in another twist there are only eight justices on the court right now since Anthony Kennedy has retired and Trump nominee Brett Kavanaugh's confirmation hearings don't start until next week. If the four conservative and four liberal justices split along expected lines, a tie would leave the lower court's ruling to stand. (A Supreme Court declaration that partisan gerrymandering is unconstitutional would have major national consequences in the future, but this specific case is only concerned with North Carolina.)

But no matter the final result, it's sure to outrage whichever party ends up harmed by the last-minute court intervention—and raise the stakes for Kavanaugh's confirmation even higher. As if the country needs more drama.

Sign up for our newsletter to get the best of VICE delivered to your inbox daily.