New York has agreed to overhaul how solitary confinement is used in state prisons, settling a long-standing lawsuit brought by a civil liberties group.

New York Civil Liberties Union Executive Director Donna Liberman calls Wednesday's agreement historic.

About 4,000 of the state's roughly 60,000 prisoners are serving their time in 23-hour confinement for violating rules.

But many of them have been held there for months and even years for minor, nonviolent violations. Advocates say that's overly harsh and mentally damaging.

Under the agreement, the state will seek to move 1,100 such prisoners to more rehabilitative housing units in the coming months.

Among other changes, state officials will also retrain guards across the state's 54 prisons and limit the number of offenses that can result in solitary.