(Helene Vallee/Getty Images/Vetta)

“VIOLENTLY INSANE,” the Supreme Court wrote in 1890 of prisoners who had experienced solitary confinement. “The edge of madness, perhaps . . . madness itself,” Justice Anthony M. Kennedy echoed 125 years later. Justice Kennedy’s concurring opinion last month in Davis v. Ayala all but invited a legal challenge to the age-old practice of holding prisoners in near-total isolation. Such a challenge is overdue: Solitary confinement is incontestably cruel but unfortunately far from unusual.

Justice Kennedy’s opinion rewinds through years of scholarship and other commentary on solitary confinement, from prison reformer John Howard to novelist Charles Dickens to the Supreme Court justices who said the practice bore a “peculiar mark of infamy” in its ability to shatter the minds and spirits of prisoners. The horror of solitary confinement — which often masquerades under names such as “prison segregation” or “restricted housing” — remains clear today. When prisoners eat, sleep and defecate in spaces no larger than parking spaces, with no social contact for 23 hours per day, healthy inmates go mad, and those already sick get sicker. Yet federal and state prison systems continue to hold more than 80,000 prisoners in some form of restricted housing, 25,000 of those in “supermax” facilities usually made up of solitary confinement cells.

Justice Kennedy’s opinion is particularly encouraging in its broad assessment of solitary confinement, which he says exacts too high a “human toll” on all inmates. It is not only vulnerable populations — the mentally ill, the young, the pregnant — who should be rescued from this barbarism. A more exhaustive overhaul of prison segregation is in order, one that guarantees that only the extremely dangerous be subject to solitary conditions, and only when absolutely necessary.

Perhaps there are a handful of prisoners in each state whose situations merit strict solitary confinement. There are not hundreds, and surely not thousands. Even the most violent and volatile inmates deserve a more ethical system that trains guards to interact with prisoners, offers incentives for good behavior and presents an easier path to reduced restrictions. In suggesting that the judiciary might mandate the adoption of alternative long-term confinement methods, Justice Kennedy has opened the door to needed reform.

But it should not take a court case for that reform to happen. Federal and state officials should look closely at their prisons and rethink who is in solitary and why. Early reformers such as Mississippi, Maine and Colorado have more than halved solitary confinement numbers and shut down some units altogether. Besides being more humane, reformed methods tend to reduce violence and even save money. These states have shown that change is workable, and Justice Kennedy’s opinion is a wake-up call to every prison system to do better.