For more than two decades, the “box” has been where New York’s most despised prisoners went to disappear. Flagged by correctional officers as unruly or dangerous, troublemakers would be locked up in this network of solitary confinement cells with virtually no human contact 23 hours a day, left to spiral into despair and psychological devastation. Now the state government is beginning to dismantle this infamous testament to the American way of torture.

Under a groundbreaking settlement recently reached between New York state and the New York Civil Liberties Union, correctional authorities say they will “comprehensively overhaul solitary confinement” across the state’s prison system. The advocacy groups and solitary confinement survivors who brought a legal challenge hope that ending the worst forms of punitive isolation will help establish essential human rights standards in one of the country’s largest prison systems.

The five-year reform plan directs the state to release people incrementally through a step-down approach. Authorities will grant automatic early release on the basis of good behavior, end the use of starvation punishment through revolting rations of Nutraloaf and expand access to phone communications and recreational opportunities. The state will sharply limit the infractions that could land someone in extreme isolation. Placements will now be limited to less than three months, except in cases involving severe assault or attempted escape, and under one month for first-time nonviolent offenders. But even after leaving the box, the solitary confinement population — currently about 4,000 individuals statewide — will be far from free and will likely always be haunted by the experience.

The immediate beneficiaries are about 1,100 inmates who will be shifted out of solitary and into tailored rehabilitative services — including behavioral therapy, drug treatment and special programming for youths. The release plans for this cohort illustrate how the box has been twisted into a repository for people the system is not equipped to handle.

Thirty-nine people in the box will transition into rehabilitative services, without which they would “otherwise be released directly from solitary to the streets,” according to the settlement. While formerly incarcerated people generally face steep social and economic barriers after release, survivors of solitary may need even more extensive therapy and social supports to help them cope with life in the community, and there’s no guarantee of a full recovery. What is certain is that the time they have lost to the box is irrevocable. The mental torture of solitary has created tremendous long-term social costs for people who might otherwise be able to reintegrate more readily into their communities and the labor force after release.

Also exiting the box are 64 people with developmental disabilities. They are a segment of the prison population for whom solitary is often administered as a form of therapy rather than outright punishment — isolating people ostensibly to protect them from harming themselves or others. Yet this lethal conflation of security and suppression suggests that punitive segregation (sometimes euphemistically called restricted housing) has become a tool for managing disorder. While isolating mentally unstable or vulnerable people may quiet a restive cellblock, it inevitably deprives them of critical therapy and social care to which they would normally be entitled, had they wound up in an asylum instead of a cell.