The U.S. Supreme Court’s decision in 2019’s Rucho v. Common Cause was a painful setback for voting rights advocates. By a 5–4 vote, SCOTUS slammed the federal courthouse door on partisan gerrymandering claims, ruling that they cannot be brought under the U.S. Constitution. But Rucho had a silver lining in Justice Elena Kagan’s powerful dissent, which showed state judges how to kill off the practice under their own constitutions. Her dissent served as a blueprint for the North Carolina court that invalidated the state’s legislative gerrymander on Tuesday. That decision charts a path forward for opponents of political redistricting. Every state constitution protects the right to vote or participate equally in elections, and state courts can take up Kagan’s call to arms to enforce those protections under state law.

The brilliance of Kagan’s dissent lay in its clarity: She laid out the precise harms inflicted by partisan gerrymandering and explained how they can be measured and remedied. Kagan identified two distinct but intertwined constitutional violations: Warped maps “reduce the weight of certain citizens’ votes,” depriving them of the ability to participate equally in elections; they also punish voters for their political expression and association. These dual injuries, Kagan concluded, implicate fundamental principles of both equal protection and freedom of speech.

After castigating her conservative colleagues for minimizing these harms, Kagan illustrated the ease with which courts can address them. In his Rucho opinion, Chief Justice John Roberts insisted that federal courts were unable to determine when a partisan gerrymander goes “too far.” Kagan pointed out that, in fact, plenty of lower courts have already done exactly that. These courts deployed a three-part test. First, they ask whether mapmakers intended to entrench their party’s power by diluting votes for their opponents. Second, they ask whether the scheme succeeded. Third, they ask if mapmakers have any legitimate, nonpartisan explanation for their machinations. If they do not, the gerrymander must be tossed out.

“If you are a lawyer,” Kagan wrote, “you know that this test looks utterly ordinary. It is the sort of thing courts work with every day.” In practice, the most important part of the test—its evaluation of a gerrymander’s severity—often boils down to a cold, hard look at the data. Take, for instance, North Carolina’s congressional map, which contained 10 Republican seats and 3 Democratic ones. Experts ran 24,518 simulations of the map that used traditional, nonpartisan redistricting criteria. More than 99 percent of them produced at least one more Democratic seat. The exercise verified that North Carolina’s map isn’t just an outlier but “an out-out-out-outlier.”

Roberts rejected Kagan’s reasoning, asserting that her test was “indeterminate and arbitrary.” But on Tuesday, the Wake County Superior Court rested its decision on precisely the three-part test that Kagan proposed. And the court deployed Kagan’s methods to demonstrate that North Carolina’s legislative gerrymander is, indeed, an “out-out-out-outlier.” Experts ran thousands of simulations to gauge the severity of the map’s partisanship and found that the current gerrymander is more favorable to Republicans than about 99.99 percent of maps drawn using nonpartisan redistricting factors.

This fact wouldn’t matter if North Carolina courts were powerless to stop partisan gerrymandering. But state courts are free to interpret their constitutions differently from SCOTUS and are not bound by Rucho. The Wake County Superior Court therefore refused to adopt Roberts’ blasé skepticism toward the judiciary’s competence to defend voting rights.

Instead, the court embraced Kagan’s view of gerrymandering as an assault on equal protection and free speech. The North Carolina constitution safeguards “the fundamental right of each North Carolinian to substantially equal voting power,” the court wrote. It also protects citizens’ ability to engage in “core means of political expression,” including “voting for the candidate of one’s choice and associating with the political party” without retaliation. Partisan gerrymandering infringes upon these freedoms, diluting citizens’ vote on the basis of their political expression. In short, the court imbued the North Carolina constitution with the same protections that Kagan sought under the First and 14th Amendments to the U.S. Constitution.

The court even took a step further than Kagan, because unlike the U.S. Constitution, the North Carolina constitution declares that “all elections shall be free.” This clause, the court held, means “that elections must be conducted freely and honestly to ascertain, fairly and truthfully, the will of the people.” Partisan gerrymandering violates that guarantee by “specifically and systematically designing the contours of the election districts for partisan purposes and a desire to preserve power.”

Explicit protections against partisan gerrymandering are extremely common in state constitutions.

This interpretation of “free elections” closely mirrors a 2018 decision by the Pennsylvania Supreme Court. In that ruling, the court ruled that partisan gerrymandering violates a provision of the Pennsylvania constitution which declares that all elections “shall be free and equal.” An election is not “free and equal,” the court held, unless every voter has “an equal opportunity to translate their votes into representation.” It thus invalidated the gerrymander. (In her Rucho dissent, Kagan cited the Pennsylvania Supreme Court’s decision as an example of courts doing exactly what Roberts claimed they could not.)

Explicit protections against partisan gerrymandering are extremely common in state constitutions. Thirteen state constitutions, including Pennsylvania’s, require elections to be “free and equal,” while an additional 13 demand that elections be “free and open.” Moreover, 49 state constitutions expressly safeguard the right to vote, which can be interpreted as the right to cast an equal vote undiluted by gerrymandering. Finally, most state constitutions guarantee freedom of speech and equal protection in some capacity. As Kagan noted, any basic conception of free expression and equality should limit politicians’ ability to punish voters on the basis of their political association. And none of these courts is bound by SCOTUS’ cramped view of constitutional liberties; they are free to interpret their state constitutions much more broadly.

Not every state judiciary is as progressive as Pennsylvania’s or North Carolina’s. (Republicans declined to appeal Tuesday’s decision, probably because the North Carolina Supreme Court has a 6–1 Democratic majority.) Other states with terrible gerrymanders—like Alabama, Arkansas, Ohio, Texas, West Virginia, and Wisconsin—have much more conservative judiciaries. But in each of those states, supreme court justices are either chosen by the governor or elected by the people. In other words, they are selected through a process that cannot be gerrymandered.

Voting rights advocates are already focused on state supreme courts as the next battleground in the war on gerrymandering, and rightly so. Rucho was a brutal blow, no doubt, but Kagan’s dissent gave state courts a step-by-step guide for tackling the problem of political redistricting. Mapmakers cannot prevent citizens in many gerrymandered states from flipping their supreme courts. As the Wake County Superior Court just proved, state judges are perfectly capable of grabbing the baton from Kagan and running with it.