Virginia Gov. Terry McAuliffe (D) speaks with reporters in Washington in May. (J. Scott Applewhite/Associated Press)

THE VIRGINIA Supreme Court ruling that Gov. Terry McAuliffe (D) overstepped his powers in restoring voting rights to 206,000 felons who have completed their sentences is a model of pretzel-twisted reasoning that glosses over the plain language of the state’s constitution and elides recent state history to arrive at a conclusion whose effects are as heedless of national trends as they are racially retrograde.

Writing for the majority in a 4-to-3 decision, Chief Justice Donald W. Lemons upended the governor’s executive order — challenged by political rivals whose legal standing to sue is shaky at best — mainly on the basis of history and tradition. Yet in doing so, he failed to cite any constitutional language that would contravene Mr. McAuliffe’s power to issue his directive.

And while acknowledging that its analysis was rooted more in history than the constitution, which explicitly empowers Virginia governors to restore voting rights, the court seemed oblivious that the state’s history — tainted as it is by profound racial injustice — has evolved radically.

The chief justice made much of the fact that none of the state’s previous 71 governors saw fit to issue a clemency order as sweeping as Mr. McAuliffe’s. Yet he conveniently ignored the reality that for more than 20 years, successive governors have exponentially expanded the re-enfranchisement of convicted felons — from just 460 under Gov. George Allen (R), in the mid-1990s, to more than 8,000 under Gov. Robert F. McDonnell (R), who left office in 2014, including more than 2,000 in the last few months of his term.

It’s true, as the chief justice wrote, that no previous governor restored voting rights “to a class of unnamed felons without regard for the nature of the crimes or any other individual circumstances relevant to their request” — though political calculation may have played a greater role in restraining them than legal analysis. Yet the court took no account of the fact that Mr. McDonnell established a system by which the voting rights of nonviolent felons were restored automatically as they finished their sentences, also in blatant contravention of Virginia’s supposedly hallowed history and tradition. Nor would Mr. McDonnell have transgressed if he had included violent felons; those criteria are at a governor’s discretion.

The court’s conservative majority accepted Republican arguments that restoring voting rights must be an individualized process, though Virginia’s constitution says no such thing. Mr. McAuliffe is correct that he is now within his rights to sign — using banks of mechanical autopens — “individual” letters restoring voting rights to the same ex-convicts whose rights are now in jeopardy owing to the court.

On the question of legal standing, the court accepted the idea that the plaintiffs challenging Mr. McAuliffe’s order — top Republican state lawmakers — were directly harmed, and therefore entitled to sue, because the prospect of tens of thousands of new voters would “dilute” the impact of existing ones. That specious view was demolished in a dissent by Justice William Mims, a Republican former state attorney general.

The real dilution of voting rights in Virginia involves African Americans of voting age, 1 in 5 of whom is disenfranchised by the prohibition against felons voting, even after their debts to society have been paid. That stain on Virginia is worth removing — collectively, or as Mr. McAuliffe is now doing, one by one.