LED BY Chief Justice John G. Roberts Jr., the Supreme Court on Tuesday gutted a key element of the Voting Rights Act, one of the most potent anti-discrimination tools Congress ever devised. It was an audacious ruling devoid of the restraint the chief justice and his colleagues in the majority should have shown.

Among other things, the act obliges certain states and localities to “pre-clear” any change in electoral policy or procedure with either the Justice Department or a federal court. In its 5 to 4 decision, the court didn’t squash the notion that such a powerful measure could be acceptable. Instead, the majority held that the formula Congress used to determine which jurisdictions to subject to pre-clearance — mostly in the South, with its grotesque history of racial discrimination — was an artifact from the 1960s with “no logical relation to the present day.”

Yet, Congress concluded in 2006, the last time that it reauthorized the Voting Rights Act, that the formula was still very relevant. And, Justice Ruth Bader Ginsburg pointed out in a spirited dissent, federal lawmakers have wide latitude under the 14th and 15th amendments to preserve meaningful access to the vote, particularly against policy or procedural manipulations that limit the franchise of racial minorities. That’s why a previous high-court holding found that those lawmakers could use “any rational means” to combat racial discrimination at the ballot box — a permissive standard.

Congress spent months in 2006 amassing a massive record to show that, even though the first generation of discriminatory voting measures had been eradicated, subtler but significant forms of discrimination in jurisdictions subject to pre-clearance remained “serious and pervasive.” Lawmakers also considered evidence that discrimination still occurs disproportionately in those places. Because people and places change, Congress allowed jurisdictions with 10 years of good behavior to “bail out” of pre-clearance. It also allowed courts to “bail in” jurisdictions if need be. Both were essential elements of the system, allowing it to adapt to changing realities. That was the basis upon which a 390 to 33 majority in a Republican-controlled House and a 98 to 0 majority in a Republican Senate determined that pre-clearance requirements remained rational policy that deserved extension until 2031.

The question in Tuesday’s case, Justice Ginsburg wrote, was who gets to make the judgment about that extension — “this court, or a Congress charged with the obligation to enforce the post-Civil War amendments ‘by appropriate legislation.’ ” Instead of taking a more modest course, perhaps by enhancing the opportunity for jurisdictions to bail out, Justice Roberts and the jurists who joined him instead substituted their reading of the substantial evidence available for that of Congress. That’s not just calling balls and strikes — that’s pushing the batter aside and stepping into his place.

According to the ruling, lawmakers still have room to devise a new formula for determining which states and localities should have to pre-clear their election rules. Lawmakers should proceed, while taking care — both because pre-clearance is as formidable a tool as it is effective and because a skeptical chief justice will be watching.