RACE WAS an impermissibly predominant factor in the drawing of two North Carolina congressional districts, the Supreme Court determined Monday, upholding a lower-court ruling. In the process, the court did two welcome things. First, it made clear that politicians drawing district lines will face strong constraints in shuffling minority voters in or out of political boundaries. Second, it declared that those challenging district maps have several ways of substantiating their claims, flexibility that might aid plaintiffs in future gerrymandering lawsuits.

North Carolina has become the poster child for voter-suppression laws and absurd gerrymandering. Following the 2010 Census, its Republican legislature produced an astonishingly slanted congressional map. Though the state is closely divided politically, it sent nine Republicans and only four Democrats to Washington after the 2012 election. This alone may not have raised the court’s ire: The justices have ruled that gerrymandering for partisan reasons is generally permissible. What’s not, most of the time, is moving district lines around based on voters’ race, rather than their party.

In the case of its 1st Congressional District, North Carolina claimed an exception. The state argued that it packed more African Americans into the traditionally Democratic district because the state was worried that it would have otherwise violated the 1964 Voting Rights Act. In some cases, the act requires that minority populations be bunched together so that their preferred candidates can win, in order to curb the dilution of minority votes.

In fact, the state legislature almost certainly moved minority voters into the 1st District to make the adjoining districts whiter and, therefore, more Republican. Nothing in the district’s voting history, which is reliably Democratic, suggests minority voices were being drowned out before. The state claimed that population shifts necessitated adding thousands of voters to the district, and that legislators wanted to be sure these changes did not result in minority vote dilution. But it could point to no serious analysis backing up its claim.

The state’s invocation of the Voting Rights Act was cynical, and it deserved to be repudiated. The court made clear that judges will not allow a law meant to offer minority voters a fair shot at representation to be used as pretext for race-based voter-map manipulation unrelated to that goal.

Also notable, and more controversial among the justices, was that the court granted flexibility to those challenging district lines on the grounds that they were drawn according to impermissible racial considerations. In the case of North Carolina’s 12th Congressional District, the second one the court struck down on those grounds, the state claimed that its opponents had to produce an alternative legislative map showing what the district would have looked like absent the consideration of unlawful racial factors. The court ruled sensibly that other kinds of evidence, such as statements from lawmakers and expert studies, could obviate the need for an alternative map.

As the courts deal with assertive GOP efforts to fix the electoral rules in ways that disadvantage minorities, the Supreme Court’s Monday findings are welcome.