MONTGOMERY, Ala. — As the deadline approaches, Alabama officials are working on a proposal to overhaul mental health care in Alabama prisons, which a federal judge ruled so “horrendously inadequate” that it violates the U.S. Constitution’s ban on cruel and unusual punishment.

U.S. District Judge Myron Thompson scheduled a Sept. 7 status conference to get an update on mediation between the state and lawyers for inmates who sued the Alabama Department of Corrections. Thompson ruled in June that Alabama was failing to provide adequate care and ordered the state to work on mediation until Sept. 1.

Alabama Gov. Kay Ivey said last week that the state is in discussions about hiring additional mental health and correctional staff, and building new prisons. Ivey said the Department of Corrections is compiling information on “how much mental health staffing we need, how many correctional officers we need.”

“This is not a quick fix for sure, but we’ve got to come forward and will come forward with a recommendation on what we are going to do to fix the problem,” she said.

The Alabama Legislature will have to allocate money for any changes, and Ivey met with key lawmakers last week about possible proposals but they declined to discuss specifics. The governor said the state was “making progress” in the ongoing mediation.

Maria Morris, an attorney with the Southern Poverty Law Center, which is representing inmates, said thousands of Alabama inmates eventually will get “much better mental health care than they have been receiving” because of Thompson’s directive.

Morris said new mental health treatment areas are needed, but she doesn’t think the order “required the construction of new prisons.”

Thompson, after ruling against the state in June, ordered the two sides to attempt mediation on a proposed remedy through the summer. If a joint agreement cannot be reached, the court will consider suggestions from both sides in the fall.

Dozens of inmates filed the lawsuit against the prison system in 2014, claiming the state was failing to provide basic medical and mental health care. About 3,300 inmates in state prisons have been identified as having a mental health condition.