Under pressure from a lawsuit brought by the New York Civil Liberties Union on behalf of three people held in long-term solitary confinement, New York has agreed to a set of changes to its use of solitary and other forms of extreme isolation in state prisons. The agreement, announced on Wednesday, would bar certain vulnerable populations from isolated confinement, while for the first time setting firm guidelines and maximum durations for isolating others.

New York currently holds some 3,800 men, women, and children in 23-hour-a-day isolation in small, sometime windowless cells, either alone or with one other person. “The conditions inside New York’s isolation cells are deplorable and result in severe physical and psychological harm,” stated the original complaint in Peoples v. Fischer, filed in Federal District Court in Manhattan in December 2012. The complaint, which charges the state with violating the plaintiffs’ Constitutional rights under the 8th and 14th Amendments, continues:

Individuals are confined idle and isolated for months and years on end in tiny cells. They are allowed only one hour of exercise a day in barren cages smaller than their cell. As additional punishment, prison staff may issue orders depriving individuals of what little remains—access to nourishing and edible food, exercise, bedding, and showers may all be denied. At some prisons, two men are forced to share a single isolation cell for weeks and months on end, often leading to violence. Requests for mental health care must be discussed through the food slot in the cell door.

People are placed in isolation on the word of corrections staff, who issue tens of thousands of disciplinary “tickets” each year that result in time in the state’s numerous Special Housing Units (SHUs) or its two supermax prisons. Five out of six tickets are for nonviolent misbehavior, according to a 2012 report by the NYCLU, and disciplinary hearings are at best pro forma. The average SHU sentence is five months, but many extend for years and a few have stretched to decades. UN Special Rapporteur on Torture Juan Méndez has stated that solitary confinement beyond two weeks is cruel, inhuman, and degrading treatment, and often qualifies as torture.

The most dramatic reform brought about by the agreement between the state and the NYCLU is a ban on using solitary to discipline youth under the age of 18, which makes New York the largest state in the nation to prohibit the practice for juveniles in state prisons. In New York, 16 and 17 year olds accused of a felony are automatically tried and incarcerated as adults, and large numbers have ended up in the SHUs, sometimes for “their own protection.” Under the new deal, juveniles with serious disciplinary violations would be would be placed in special units with more out-of-cell time and special programming.

The agreement also bans placing pregnant women in solitary, and sets a 30-day limit on isolating people with developmental disabilities. A 2007 court settlement and a law enacted in 2011 already prohibit the use of isolated confinement for people with serious mental illness. Since the passage of the SHU Exclusion Act, several hundred people have been moved from solitary into special Residential Mental Health Units (though evidence suggests that hundreds of others remain isolated in spite of mental illness, largely due to issues around diagnosis).

“It made sense to immediately remove these vulnerable populations from extreme isolation,” Taylor Pendergrass, the NYCLU’s lead attorney in the suit, told Solitary Watch. “But in the longer term, we believe this process will bring about more comprehensive reforms that will affect many more people.” Those reforms will come, in large part, in the form of “sentencing guidelines” that designate punishments for different disciplinary infractions, and for the first time set maximum sentences in the SHU. The negotiated guidelines are covered by a confidentiality agreement until staff can be trained and the new rules put in place–a process that should take no more than nine months, Pendergrass said.

The deal also calls for New York State and the NYCLU to each choose an expert who will assess the use of isolated confinement throughout the prison system over the next two years and make further recommendations for change. The state has selected James Austin, a widely known expert on “prisoner classification” whose report to the Colorado Department of Corrections led to a reduction in the numbers of individuals held in long-term solitary in that state.

The NYCLU has chosen as its expert Eldon Vail, former head of the Washington State Department of Corrections. Vail has said publicly that solitary confinement produces “disastrous results.” He is known for conducting studies and programs in Washington’s state prisons aimed at not only reducing the use of solitary, but also tempering its effects by providing programming, therapy, and group activities for those separated from the general prison population. “He knows that treatment works better than torture,” Pendergrass said of Vail. “He is a pioneer in evidence-based approaches to prison safety and security, which do not include extreme isolation and sensory deprivation.”

The choices suggest that while the state is on board for some modest reductions in the numbers of people it holds in solitary and the length of time they spend there, the NYCLU envisions more sweeping change, which would eliminate the total isolation of solitary confinement in favor of a more rehabilitative model. In this, it is aligned with other reform efforts in the New York, including a bill introduced last month in the state legislature that aims to “fundamental transform” how prisons respond to people’s “needs and behaviors” by replacing SHUs with “Residential Rehabilitation Units.”

These more comprehensive reforms could help one group that is not affected by the current rounds of changes–those held in “administrative segregation” rather than “disciplinary segregation.” These include individuals who are classified as safety risks and sometimes spend decades in solitary confinement. Among these is William Blake, who has spent more than 26 years in isolation and whose essay on life in the SHU, “A Sentence Worse Than Death,” was published by Solitary Watch last year.

In the meantime, Pendergrass expects there will be some who feel the current deal goes too far, just as others believe it does not go far enough. He did not specify where the “pushback” is likely to come from. But in the past, correctional officers unions have generally been strong opponent of any restrictions on the use of solitary confinement.

In a statement to the New York Times, the New York State Correctional Officers and Police Benevolent Association said of the new agreement: “Today’s disciplinary confinement policies have evolved over decades of experience, and it is simply wrong to unilaterally take the tools away from law enforcement officers who face dangerous situations on a daily basis. Any policy changes must prioritize the safety and security of everyone who works or lives in these institutions.”

The NYCLU’s lawsuit is on hold while Austin and Vail complete their work. If the group–and its incarcerated clients–are not satisfied with the results, the litigation may resume. Meanwhile, the three named plaintiffs in the suit–Leroy Peoples, Dwayne Richardson, and Tonja Fenton–have all been released to the general population from the SHUs. “Life in the box stripped me of my dignity, and made me feel like a chained dog,” Peoples said in 2012. The lawsuit that bears his name promises to spare many others the same suffering.