In a historic settlement, Ohio’s juvenile corrections agency agreed to “dramatically reduce, and eventually eliminate” the use of disciplinary solitary confinement in youth prisons.

The agreement—between the US Department of Justice and Ohio’s Department of Youth Services (DYS)—represents the first federal-level move to end disciplinary seclusion at juvenile facilities. The court order compels Ohio corrections officials to provide medical treatment to juveniles with mental health needs, rather than isolating them.

Wednesday’s settlement comes off the heels of an announcement last week by Attorney General Eric Holder calling for an end to the “excessive” use of seclusion on juvenile inmates, especially on children with mental health needs.

“This agreement will help ensure that incarceration in Ohio’s state facilities is humane and that appropriate treatment is provided for young people with mental illness,” Attorney General Eric Holder said in a statement. “The Justice Department will continue to evaluate the use of solitary confinement so that it does not become a new normal for incarcerated juveniles.”

Human rights groups have long contended that solitary confinement can cause serious psychological and developmental harm, especially in children and people with mental illness. Amy Fettig, senior staff counsel of the American Civil Liberties Union, said the Ohio settlement shows that the nation might finally be waking up to that fact.

“It is a nationwide signal that what once was a routine practice is no longer acceptable to the Department of Justice under the law,” Amy Fettig told The Nation. “This is an important first step. Ohio is the first state, but it certainly isn’t going to be the last.”

The DOJ first investigated Ohio juvenile facilities in 2007, finding “constitutional deficiencies in the state’s use of physical force, mental health care, grievance investigation and processing and use of seclusion.” Ohio DYS entered into consent decrees in 2008 with the DOJ and private plaintiffs to stop the unlawful seclusion of juvenile inmates.

But a review of data in 2013 found that the state continued to routinely isolate youth battling mental health problems. In the second half of 2013 alone, Ohio DYS secluded 229 boys with mental health needs for almost 60,000 hours total.

A 2012 study by the Justice Department’s Office of Juvenile Justice and Delinquency Prevention found that more than one-third of youth in custody have reported being isolated at some point. Of those, fifty-five percent said they were isolated for more than twenty-four hours. The majority of those isolated said they had never talked with a counselor since arriving at their facility.