For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

A federal court in North Carolina struck down the state’s congressional map Tuesday afternoon, calling it unconstitutionally gerrymandered in favor of Republicans—a decision that could help Democrats retake the US House of Representatives in November. But the ruling is also notable because it deals with the very issue the US Supreme Court is currently wrestling with in two separate cases: whether extreme partisan gerrymandering can be found unconstitutional.

The majority of a three-judge panel found that North Carolina’s congressional map, drawn in 2016 and which helped Republican candidates take 10 of the state’s 13 seats in the House of Representatives that year with just 53 percent of the votes, infringed on voters’ constitutional rights. This decision comes after the state’s previous map was deemed illegal for being racially gerrymandered in 2016.

This is the first time that a federal district court has struck down a congressional map for partisan gerrymandering. The nearly 200-page opinion states that the map “violates the Equal Protection Clause because it reflects a successful, and unjustified, effort by the General Assembly to subordinate the interests of non-Republican voters and entrench Republican Representatives in power.” It also argues that the map violates the First Amendment by burdening free speech and free association rights of voters who do not support Republicans. Finally, the court found that the map violates the Constitution’s “grant of authority to ‘the People’ to elect their Representatives”—in other words, rather than choose their representatives, their representatives chose their voters.

The opinion furthermore highlighted the danger of a partisan gerrymander that entrenches one political party in power. “[A] legislature that is itself insulated by virtue of an invidious gerrymander can enact additional legislation to restrict voting rights and thereby further cement its unjustified control of the organs of both state and federal government,” the majority wrote.

The state is now blocked from moving forward with the 2018 congressional elections using the current map, and and the court gave the legislature two weeks to create a remedial plan. Should the legislature fail to create a plan that the court deems constitutional in that time period, the court says it’s prepared to put in place a map drawn by someone it appoints.

If North Carolina ultimately holds its 2018 elections under a redrawn map, that could help Democrats’ efforts to retake the House of Representatives in 2018. But Democrats can’t celebrate just yet. The Republicans who drew the map are likely to appeal to the Supreme Court, which may put the ruling on hold as it decides similar cases out of Wisconsin and Maryland, thus allowing the 2018 elections to proceed under the old map.

As election law expert Rick Hasen put it Tuesday evening, “This is a huge win for the plaintiffs but with an uncertain future at the Supreme Court.”