Drawing electoral districts based on race is not prohibited under the Constitution or the Voting Rights Act, but court interpretations of the VRA provide a three-item test (known as the Gingles test, after the 1986 Thornburg v. Gingles case) of when creating majority-minority districts is acceptable or even necessary for protecting racial minorities. Those conditions are the compactness or coherence of the minority group in question, the political cohesion of that group, and the likelihood of white voters tending to vote against that group’s preferred candidates if given a majority.

Indeed, Republican lawmakers tried to use the Gingles preconditions and the Voting Rights Act to provide legal cover for their maps, releasing a joint statement saying “the State has an obligation to comply with the Voting Rights Act,” and claiming their new maps were actually fixes to older VRA violations by previous state legislatures. But when plaintiffs from the gerrymandered districts sued the state, the Middle District court of North Carolina found their reasoning was more likely to have been aiming at racial dilution in other districts. In District 1, the court found, white voters often tended to vote along with black voters to elect “crossover” candidates, which means that the new district boundaries clearly didn’t meet all of the Gingles preconditions.

District 12 was a trickier case to analyze since its boundaries have already been subject to Supreme Court oversight and review. A prior Court decision found that the district’s extreme shape could hold on the grounds of partisan gerrymandering—which, within limits is accepted as constitutional—since it provided a safe seat for Democrats. Before the district court, Republicans claimed their changes to District 12 were built to maximize partisan advantage. The court, however, found that public statements from the redistricting chairs, State Senator Robert Rucho and State Representative David Lewis, admitting that District 12 was a remade as a VRA majority-minority district, as well as testimony from plaintiffs and data showing black voters in the general region were almost four times more likely than white voters to live in District 12, were enough evidence to constitute a racial gerrymander.

In upholding the lower court’s decisions, the Supreme Court issues one more blow to Republicans in the state, who last week vowed to fight back when the Court denied their 2013 voter-ID law a review after it was rejected by lower courts. Now, the district maps for the state General Assembly are the main outstanding item before the Court. For the immediate future, North Carolina will use maps based on redrawn legislative districts for the 2016 election that eschew the extreme shapes of the 2011 redistricting for districts with actual geographic coherence. But there’s only two more federal elections before the next round of redistricting in 2021.