EVERY DAY, state and federal prison authorities subject tens of thousands of inmates to solitary confinement, a psychological and physical hell resulting from near-total isolation in often tiny and windowless cells. Those who go in can come out disturbed. Those who go in with preexisting mental illnesses often get worse. The result is hypertension, panic attacks, self-mutilation and suicide, not to mention extreme difficulties reintegrating into the prison population or society at large. Damon Thibodeaux, who spent 15 years alone in a Louisiana state prison before being exonerated, explained to a congressional committee this year that solitary kills “bit by bit[,] day by day.”

Slowly and unevenly, however, the system is changing, or, at times, being forced to change. The latest is that Arizona’s Department of Corrections has struck a deal with the American Civil Liberties Union requiring several reforms in its solitary confinement policy, under which some 3,300 prisoners are kept in isolation. Mentally ill inmates will now be allowed at least 19 hours a week outside their cells, three of which must contain appropriate, structured activities. Prisoners without serious mental illnesses will have at least seven hours outside their cells. Inmates will also be able to earn more free time and access to more activities, such as performing a prison job. These changes come on top of enhancements to Arizona’s prison health-care system, which had an appalling record of neglecting inmates with serious conditions, mental and otherwise.

In some ways, Arizona’s use of solitary confinement has been worse than others’. David C. Fathi, director of the ACLU National Prison Project, said the state still automatically assigns all inmates with life sentences to serve their first two years in isolation, whether they were convicted of a violent crime or not. This is a gratuitously nasty punishment that sets prisoners up to be problem inmates. Even after the settlement, guaranteeing prisoners a mere one hour per day outside their cells is hardly lenient, only justifiable if a prisoner is an extreme risk to staff or other inmates.

Yet Arizona’s Department of Corrections has not been alone in enforcing some counterproductive, harsh rules. Systems in states across the country have devised bizarrely mean-spirited restrictions, such as denying prisoners reading material or even timepieces, making it impossible for them to keep their mind from slipping away or to determine whether it is day or night.

Mr. Fathi predicts that once Arizona sees its rates of inmate suicide and other psychiatric issues drop, prison officials will ease up even more. The optimistic view extends beyond the state’s borders: Others, too, may note the movement in Arizona, as well as in early reformist states such as Colorado, Maine and Mississippi, and decide that it is also in their interest to end the common use of unnecessary and debilitating isolation. The less optimistic view is that it will take more lawsuits to force some states to change.