In a historic victory against partisan gerrymandering, a federal court unanimously struck down North Carolina’s Republican-drawn congressional map on Tuesday for discriminating against Democratic voters in violation of the First and 14th Amendments. That makes this the first time ever that a federal court has invalidated a congressional map on such grounds, and it could lead to enormous changes in how redistricting is conducted in North Carolina and nationwide.

In an effort to ensure new maps will be in place for the 2018 elections, the three-judge panel hearing this case has given the GOP-dominated state legislature two weeks to redraw the lines, but Republicans say they plan to appeal to the Supreme Court. However, if this ruling survives appeal and leads to a less partisan map, it would strike a huge blow against one of the worst gerrymanders ever drawn, which left Democrats with just 3 of 13 seats in what is an evenly divided swing state. Indeed, as we have demonstrated, Democrats could gain several more seats with a nonpartisan map.

The ruling is so momentous because, for the past three decades, the Supreme Court has maintained that drawing maps for the benefit of one political party could violate the Constitution but has never before agreed to strike down any particular map, saying the judiciary lacks a standard for determining when gerrymandering crosses the line into a constitutional harm.

To address this concern, the North Carolina court established its own standard. To prove the GOP’s map was unconstitutional, said the judges, plaintiffs had to demonstrate three things: 1) that the map was enacted with discriminatory partisan intent; 2) that the map had a discriminatory effect that produced an asymmetric and durable partisan advantage for the map-making party; and 3) that the map couldn’t be defended as a byproduct of nonpartisan redistricting criteria like geographic compactness.

Plaintiffs relied on a broad array of evidence to satisfy these three requirements, including multiple statistical tests to measure the partisan advantage the current map gave the GOP and thousands of alternative computer-generated maps to demonstrate how this advantage couldn’t have been obtained had Republican mapmakers relied solely on neutral redistricting criteria.

However, the biggest smoking gun was the literal admission by state Rep. David Lewis, who chaired the state House redistricting committee, that the GOP really did engage in partisan gerrymandering when Lewis oversaw redrawing the map in 2016: