Demonstrators rallied during oral arguments in Gill v. Whitford, a case about partisan gerrymandering in electoral districts, on October 3, 2017.Joshua Roberts / Reuters

The Supreme Court made a painfully flawed decision yesterday on partisan gerrymandering. In fact, the decision has only one point in its favor: It is better than the alternatives. There was no good answer, but the Court chose the least bad one.

If that sounds like a reluctant endorsement, it is. Like nearly every sentient American nowadays, I think partisan gerrymanders have gone too far. In the case before the Court, North Carolina Republicans gerrymandered their purple state so that in 2018 they won only half the statewide vote, but nine of 12 congressional districts. At least they were explicit about their motives. “I think electing Republicans is better than electing Democrats,” David Lewis, a Republican member of the North Carolina general assembly, told a redistricting committee. “So I drew this map to help foster what I think is better for the country.” In a second instance before the Court, Maryland’s Democrats did something comparable.

Extreme partisan gerrymanders are unfair, because they distort the result of elections to produce legislative bodies that do not accurately reflect the party leanings of the voters. Extreme partisan gerrymanders are also unhealthy for democracy, because they allow politicians to choose their voters, rather than the other way around. I won’t belabor those points.

The question is not whether there is a problem, but how to solve it. Yesterday, in Rucho v. Common Cause, the Supreme Court said: Don’t look at us. In a 2004 decision, the Court had declined to strike down a partisan gerrymander, but it dangled the possibility that it might overturn a more extreme gerrymander in the future. Encouraged, reformers had no trouble finding outrages to challenge. In Rucho, the Court slammed the door against such challenges and locked it. “Partisan gerrymandering claims are not justiciable,” wrote Chief Justice John Roberts for the majority. Translation: Go away and don’t come back. The Court’s four liberals were scathing in dissent.

Why, then, was the Court’s ruling the least bad decision? Three reasons: political, constitutional, and prudential.

First, political. Although no one these days has a kind word to say about gerrymandering, it is a hallowed American tradition, dating back to the Founders’ era. When a practice has been around that long, we need to consider the possibility that it may serve a purpose beyond just rigging the system.

And so it does. In the American system, where every federal officeholder except the vice president is independently elected, legislative leaders can lead only if they can give followers an incentive to follow. To hold politicians accountable to one another (which the Constitution does not do), political parties and machines emerged. Their M.O. is to reward loyalists with goodies like pork-barrel spending, campaign money, endorsements, and—most important—easy reelection campaigns. By building safe districts, party leaders are able to protect incumbents who take tough votes on, for example, raising a tax or cutting a popular program. If, in contrast, every seat is always competitive, incumbents will survive by pandering to pressure groups. Reducing political competition is thus not always a bad thing; it can provide political heat shields for hard choices.

The point is not that gerrymandering is always good or always bad, but that gerrymandering is a tool that political leaders can use for good, ill, or some combination of the two. Take away that tool, and government may become even more chaotic and disorganized. We have seen more than enough dysfunction created or exacerbated by well-intentioned reforms already.

Because the gerrymander is inherently a political tool, courts are poorly equipped to decide when it can be used, by whom, and to what extent. Courts will look for bright lines that don’t exist. They will consider politics too much, or not enough, or they will get the politics wrong. They will sow confusion by issuing vague and sometimes conflicting guidelines. They have tunnel vision, because they can look only at the facts of the case before them and at the legal precedents that apply. And with their unelected, life-tenured positions, they will not be politically accountable for the results. The one foreseeable result of turning judges into redistricting referees is that the results will be unforeseeable. Whatever those results may be, they will have the force of the Constitution behind them, making them difficult to reverse.

There is a better way: make reforms through the political process. This is hard, but it is happening: “In 2018,” reports The Washington Post, “five states had independent redistricting commissions on the ballot, and it passed in all five states.” Independent redistricting commissions, which exist in eight states, aren’t perfect, but they are more disinterested than elected politicians and more accountable than the courts. And because they are empowered by voters, legislatures, or both, they are vested with the legitimacy needed to make controversial political judgments, something courts are specifically not supposed to do.

But what about the many jurisdictions that remain stuck with gerrymandering? Aren’t their voters’ constitutional rights being violated? So the four dissenting justices in Rucho argue. Gerrymandering is “anti-democratic in the most profound sense,” writes Justice Elena Kagan in her fierce dissent.

Not so fast. The Court’s majority has the better of this argument. The Constitution confers voting rights and representational rights on individuals—not on political parties. The whole design of our system is premised on making citizens, not parties, the fundamental locus of political decision making. Political scientists can and do debate whether we might get better results with a parliamentary system, in which voters choose parties rather than candidates. But that’s not the system we have.

What reformers were asking the Court to do, in effect, is give formal, constitutional sanction to parties, by requiring that districts be drawn with an eye not just to representing every vote fairly (that’s one person, one vote), but to representing every party fairly, too, according to its share of the total votes. One can argue for or against that change, but it is much more than a technical or mechanical reform. It is a big step toward parliamentary government—a change in the constitutional order, and one whose results are, again, entirely unforeseeable.

Moreover, if the Democratic and Republican parties were given a constitutional right to fair representation, presumably all parties would share in that right. Parties new and old might come swarming out of the woodwork, demanding proportional representation. Even if the courts were able to find their way through such a morass, the consequences are anyone’s guess. Facing those and other imponderables, the Court is justifiably wary of tampering with the country’s political DNA.

Finally, there is the prudential argument. If you think abortion has politicized judicial nominations, just wait until judges are in the business of approving congressional districts. Even more than today, every judicial nominee will be vetted for party loyalty. Judges will become even harder to confirm. Partisans and interest groups will redouble their all-out warfare over the courts. And politicians and pundits will redouble their court bashing.

That Chief Justice Roberts wrote for the majority in Rucho is significant. He is one of the last remaining conservative institutionalists in the populist, anti-institutional age of Trump. Even in principle, there is no neutral, nonpolitical, and noncontroversial way to draw district lines. Once the federal courts plant themselves in the middle of the partisan crossfire over redistricting, they will never extricate themselves.

The bottom line, then, is that extreme gerrymandering needs to be curtailed, but not by politicizing the courts, rewiring the Constitution, and setting off all kinds of unpredictable consequences. It needs to be done the hard way: by changing the state and federal laws that govern redistricting.

Obviously, reformers are disappointed and angry to be thrown back into a long, uphill battle in the states and Congress. No one can blame them. Even for them, though, there is a bright side: By slamming the door on a judicial deus ex machina, Rucho forces reformers to redouble their political efforts—as no doubt they will do. Frustrating though that may seem today, in the longer run it is the sounder, surer path. In a majoritarian country, minority rule can’t last.

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