Representative David Lewis, left, led Republican redistricting efforts in the North Carolina state House.Chuck Liddy / The News & Observer via AP

DURHAM, N.C.—Federal judges have yet again struck down North Carolina’s congressional districts as an unconstitutional gerrymander, dealing Republicans a blow and throwing the state’s maps into chaos just months before a pivotal midterm election.

A three-judge panel, including one circuit-court judge and two district-court judges, ruled Tuesday evening that the Old North State’s redistricting plan relied too heavily on partisan affiliation in drawing constituencies, violating citizens’ rights under the 14th Amendment’s Equal Protection Clause, the First Amendment, and Article I of the Constitution. The decision is the first time a federal court has ever struck down a redistricting plan as a partisan gerrymander. The final word, however, will likely come from the Supreme Court, which is considering two partisan-gerrymandering cases.

When Republicans took over the North Carolina General Assembly in 2011, for the first time since 1870, they had the opportunity to redraw districts following the 2010 Census, and quickly set to drawing maps that would aid GOP candidates. In doing so, they relied in part on racial data—a practice that the U.S. Supreme Court has ruled permissible when creating majority-minority districts. In North Carolina, as in many southern states, there is a strong correlation between African Americans and Democratic voters, and this effectively helped Republicans crowd Democratic voters into fewer districts.

The plan worked extremely well. In 2012, Republicans won just 49 percent of the statewide vote but snagged nine of 13 House seats. Two years later, with 54 percent of the vote, they won 10 of 13 seats. But a lawsuit against that plan argued that the Republican maps had actually been intended to dilute black votes, and a federal court struck the plan down in 2016. (The Supreme Court affirmed that decision last spring.)

Sent back to the drawing board—or, more precisely in this high-tech era, the drawing software—Republicans did not take a conciliatory stance. Instead, forbidden from using race, the GOP proudly used partisanship as their primary criterion in drawing new maps.

“I acknowledge freely that this would be a political gerrymander, which is not against the law,” said Representative David Lewis, the chair of the state House redistricting committee. He also said, “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.” And he suggested the committee draw maps that would produce 10 Republican and three Democratic U.S. House districts, on the basis that he didn’t think it would be possible to come up with an 11-2 map.

The court decision on Tuesday noted:

Legislative Defendants do not dispute that the General Assembly intended for the 2016 Plan to favor supporters of Republican candidates and disfavor supporters of non-Republican candidates. Nor could they … Legislative Defendants also do not argue—and have never argued—that the 2016 Plan’s intentional disfavoring of supporters of non-Republican candidates advances any democratic, constitutional, or public interest. Nor could they.

The decision to openly boast about a partisan plan was perhaps unwise, but it was not unfounded. No federal court had ever struck down a redistricting plan as an unconstitutional partisan gerrymander.

Nonetheless, Common Cause and the League of Women Voters both challenged the law, and their two suits were consolidated into one. The plaintiffs argued that the plan violated the Equal Protection Clause, because it discriminated against non-Republican voters; the First Amendment, because it discriminated against voters based on previous political expression; and Article I, because it interfered with the right of the people to elect their representatives.

They brought novel statistical models to demonstrate how slanted the plan was. In particular, the plaintiffs focused on the “efficiency gap,” which measures how many votes for a candidate are wasted—either the number of votes in excess of what the candidate needs to win, common when voters backing a candidate are packed into a district, or the number of votes cast for the loser, when that candidate’s supporters are dispersed. Additionally, in a simulation of all possible North Carolina congressional maps, a Duke mathematician found that an 11-3 GOP split occurred just 0.7 percent of the time.

The legislature argued against the suit, protesting that the statistical models were dubious and not constitutionally sanctioned, and protesting that they being required to answer a koan-like question:  “How much politics is too much politics in redistricting?”

The judges were having none of it.

“A partisan gerrymander that is intended to and likely has the effect of entrenching a political party in power undermines the ability of voters to effect change when they see legislative action as infringing on their rights,” Judge James Wynn, an Obama appointee, wrote for the court. “We agree with Plaintiffs that a wealth of evidence proves the General Assembly’s intent to ‘subordinate’ the interests of non-Republican voters and ‘entrench’ Republican domination of the state’s congressional delegation.”

Wynn was joined in full by Judge William Britt, a Carter appointee, and in part by Judge William Osteen Jr., a George W. Bush appointee who accepted the Equal Protection and Article I arguments but rejected the plaintiffs’ First Amendment claim.

Wynn slapped aside the General Assembly’s arguments against the statistical models, saying that the absence of a constitutional reference to such models did not mean the court could not consider them as evidence:

Legislative Defendants’ judicial manageability argument appears to rest on a more cynical objection: that we should dismiss Plaintiffs’ actions as nonjusticiable simply because much of the evidence upon which Plaintiffs’ rely has its genesis in academic research and is the product of an effort by scholars to apply novel, and sometimes complex, methodological approaches to address a previously intractable problem. To the extent Legislative Defendants are in fact making such an argument, it fails as a matter of both fact and law.

Courts have long been wary of striking down partisan gerrymanders both because of the difficulty of deciding what is permitted in partisan gamesmanship and what goes too far, and out of fear of taking the side of one party or the other. The statistical models employed in this case are part of a new push by voting-rights advocates to quantify partisan gerrymandering, and they inspired spirited debate among the justices when the Supreme Court heard arguments about redistricting in October. Michael Bitzer, a political scientist at Catawba College, argued the North Carolina decision was written specifically to appeal to Justice Anthony Kennedy, the likely swing vote on the high Court’s partisan-gerrymandering cases.

Democrats rushed to applaud the decision. Former Attorney General Eric Holder, who is leading a national Democratic redistricting initiative, said, “Today’s ruling was just the latest example of the courts telling state legislators in North Carolina that citizens should be able to pick their representatives, instead of politicians picking their voters.” North Carolina Democratic Party Chair Wayne Goodwin said, “It's time the General Assembly put partisanship aside and draw fair, non-partisan maps that give North Carolina voters a voice.” But the North Carolina GOP’s executive director, Dallas Woodhouse, responded angrily. “It is incredibly disappointing that activist Federal Judge Jim Wynn is waging a personal, partisan war on North Carolina Republican voters,” Woodhouse said. “This is a hostile takeover of the #NCGA and legislative bodies across the U.S.”

Just how much the ruling helps Democrats—who are already hopeful that 2018 will be a wave election that hands them control of the U.S. House—remains to be seen. The election-law expert Rick Hasen noted that the Supreme Court will likely stay the decision. Even if it did not, the ultimate maps are not yet drawn. The judges granted the General Assembly another chance to draw maps, but gave them only until January 29 to propose a plan to the court—there’s urgency to get a map in place ahead of the midterm election. However, the court also announced it would appoint a special master, an outside expert, to draw a plan in the event the legislature’s plan doesn’t pass muster.

Since Republicans took control of the General Assembly, they have pursued a sweeping program of conservative policies, which has often brought them into conflict with federal courts. The legislature passed a set of voting laws, including reductions in early voting and a requirement to show photo ID to vote, but that law was largely struck down by a federal court in 2016. In June 2017, the Supreme Court affirmed a lower-court ruling striking down state-legislative districts as gerrymandered. After judges rejected a remedy, they appointed a special master who recently proposed new lines. Over the years, the Old North State has been home to several notable federal-court decisions on redistricting, and on Tuesday, Common Cause v. Rucho joined that select company.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.