A federal judge is ordering Alabama to improve the way it treats mentally ill prisoners after ruling that the state fails to provide constitutionally adequate mental health care in state lockups.

U.S. District Judge Myron Thompson of Montgomery says Alabama is putting prisoners' lives at risk with "horrendously inadequate" care and a lack of services for inmates with psychiatric problems.

The ruling comes in a class action lawsuit brought by inmates who argued the conditions violated the U.S. Constitution's ban on cruel and unusual punishment.

"This ruling means that prisoners with mental illness may finally get the treatment they have been denied for so long," says Maria Morris, senior supervising attorney with the Southern Poverty Law Center in Montgomery, which represents some of prisoners who sued.

"The suffering some of these men and women have endured is excruciating and inhumane," Morris says. "We are pleased Judge Thompson has demanded that the state of Alabama meet its constitutional obligation to provide adequate care."

Potential remedies

In a 302-page ruling, Thompson outlines "serious systemic deficiencies" in the delivery of mental health services. He says inmates are subject to serious harm and increased suicide risk in the way the state identifies, treats, houses, and disciplines mentally-ill prisoners.

Thompson writes about the severe effects of warehousing, rather than treating seriously mentally-ill prisoners. He says the impacts were crystallized when a prisoner who testified during the civil trial last year later committed suicide by hanging himself in his cell.

"Without question, [Jamie] Wallace's testimony and the tragic event that followed darkly draped all the subsequent testimony like a pall," says Thompson in the ruling.

At the time, he approved an interim settlement in which the Alabama Department of Corrections (ADOC) agreed to 15 changes, including putting a licensed mental health worker in every state prison, and providing constant observation for inmates on suicide watch.

Thompson is now ordering court-supervised meetings between corrections officials and lawyers for the inmates to come up with a remedy.

"The court emphasizes that given the severity and urgency of the need for mental-health care explained in this opinion, the proposed relief must be both immediate and long term," he says.

Alabama Gov. Kay Ivey says she's committed to providing constitutionally-permissible conditions for all prisoners, and plans to meet with Corrections Commissioner Jefferson Dunn, and legislative leaders.

"All appropriate options at my disposal, including the possibility of a special session, will be considered as potential remedies to address the judge's order," Ivey says in a written statement.

Deliberate indifference

Critics say the fix should have already come. Judge Thompson finds evidence that the state has shown "deliberate indifference" to the unconstitutional conditions.

"Officials admitted on the stand that they have done little to nothing to fix problems on the ground, despite their knowledge that those problems may be putting lives at risk," Thompson says.

The problems are driven by chronic overcrowding and understaffing, acknowledged by Commissioner Dunn who testified about wrestling with the "two-headed monster" plaguing Alabama's prisons.

State lockups are at nearly double capacity, with staffing levels that are half what they should be. For example, as the trial was starting last December, the state had just 21 doctors for more than 23-thousand prisoners.

"For far too long, Alabama prisons have been little more than warehouses where many people struggling with mental illness have been hidden away and abandoned by the state," says Lisa Borden, an attorney with the law firm Baker Donelson, which represents some of the inmates who sued.

"We look forward to now having the opportunity for our clients to receive real treatment for their illnesses, and to seeing them afforded the basic dignity to which any human being is entitled," Bordon says.

Dunn says the order requires a broader conversation with political leaders.

"While portions of the trial focused upon issues related to mental health care, it also highlighted many of the other challenges facing the department like our outdated facilities and our long-standing needs in the area of security," says Dunn. "We look forward to having an open and frank conversation with our state leadership about how to make meaningful investments into our department to ensure the safety of our staff, the security of our facilities and the well-being of those in our care."

Alabama's Republican-controlled legislature has passed some sentencing reforms and other measures aimed at reducing inmate populations in recent years but stopped short of approving a massive prison building program this year.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.