The Supreme Court’s conservative justices ruled Thursday that the highest court doesn’t have the power to address partisan gerrymandering, the practice in which politicians redraw district maps to help their own party win more elections. In two cases, Lamone v. Benisek and Rucho v. Common Cause, the court split along ideological lines 5 to 4. Chief Justice John G. Roberts wrote the majority opinion, concluding that “partisan gerrymandering claims present political questions beyond the reach of the federal courts.” The cases concerned two instances of redistricting, one in North Carolina, where plaintiffs said the map was gerrymandered to favor Republicans, and another in Maryland, where plaintiffs said it was designed to favor Democrats.

Justice Roberts agreed that the states’ district maps were “highly partisan, by any measure”—and that the practice of gerrymandering is harmful—but wrote that federal judges have no right to reallocate power from one political party to another. There’s simply no mechanism for doing so under the Constitution, he argued. Fifteen years ago, Justice Antonin Scalia similarly argued that all partisan—but not racial—gerrymandering claims should be declared nonjusticiable. At the time, Justice Anthony Kennedy left the possibility open for some future remedies from the court. Now, it looks like that door has been closed.

“If left unchecked, gerrymanders like the ones here may irreparably damage our system of government,” Justice Elana Kagan wrote in her scathing dissent. But the ruling doesn’t mean all hope is lost for reversing the harms caused by gerrymandering. For one thing, reforming the practice is extremely popular among voters. What’s more, policymakers, as well as citizens, can use the same technologies that supercharged gerrymandering to help stop it.

Louise Matsakis covers Amazon, internet law, and online culture for WIRED.

“There’s just much more sunlight that is coming in on the process,” says Michael Li, an attorney at the NYU Brennan Center for Justice's Democracy Program, where he focuses on voting issues. “Technology has enabled gerrymandering, but it is also going to enable policing gerrymandering in ways it hasn’t in the past.”

Kagan noted how new technologies put gerrymandering on steroids. “What was possible with paper and pen—or even with Windows 95—doesn’t hold a candle (or an LED bulb?) to what will become possible with developments like machine learning,” she wrote. Computers have helped politicians carve legislative districts for decades, but in the last few years, redistricting has become far more precise. Thirty years ago, The New York Times reported that at least 10 companies were offering rudimentary redistricting tech to policymakers and special interest groups (or “political magic by computer,” as the headline phrased it). Today, partisan lawmakers can use algorithms to design thousands of hypothetical district maps nearly instantaneously. With relatively few resources, they can then carefully predict how each layout might tip the scales in their favor, even adjusting house by house as needed. And since Republicans controlled a majority of state legislatures while redistricting took place after the 2010 census, those maps have skewed red.

Take what happened in Wisconsin. Republican lawmakers in the state hired a political science professor to devise a regression analysis that selected the district map that would benefit politicians from their party the most. In the next election after the map was passed into law, in 2012, Republicans won less than half the votes, but more than 60 percent of assembly seats. (The Supreme Court declined to rule on the case and sent it back to a lower court.) In her dissent, Justice Kagan pointed to similar partisan redistricting efforts carried out in Ohio and Pennsylvania around the same time.

Liberal activists decried Thursday’s ruling as a huge blow to voting rights. And gerrymandering has happened from the beginning of US history for a reason—it works. It’s difficult to vote the people who are rigging the maps out of office when they’re, well, rigging the maps.

The good news is that the technology needed to crunch census data and draw district maps has been democratized. It’s now much easier—and cheaper—for journalists, researchers, and civil rights groups to track redistricting, using free or low-cost tools running on a laptop. If one political party tries to redraw the map, citizens can quickly check themselves whether the changes would equate to gerrymandering. “People will know in an instant that this is really screwed,” says Li. “You didn’t have that sort of instant analysis in the past.” He pointed to the proliferation of open source groups studying gerrymandering, like the Princeton Gerrymandering Project.