MONTGOMERY, Ala. — The Alabama prison system agreed Thursday to put new suicide prevention measures in place after an inmate killed himself, days after testifying in a lawsuit that claims prisoners receive inadequate psychiatric care.

The Alabama Department of Corrections reached the agreement after attorneys for inmates asked a federal judge to impose emergency measures following the death. U.S. District Myron Thompson signed off on the plan Thursday, but said it is a temporary measure while the suit moves forward.

“This is a step in the right direction, but it is not a permanent fix,” said Maria Morris, senior supervising attorney with the Southern Poverty Law Center. “It will get us through the next 60 days, but the Alabama Department of Corrections needs to create a meaningful, long-term plan to address these issues, which is one of the reasons we originally filed this lawsuit.”

The prison system agreed to keep a licensed mental health professional on staff at each major facility and implement new evaluation, monitoring and follow-up care procedures for inmates at risk for suicide.

The department issued a statement Friday saying the agreement, “reflects our commitment to appropriately monitor individuals in the department’s custody who are identified as or suspected of being suicidal.”

“The ADOC is committed to the goal of preventing suicides in the state correctional facilities and will continue to rely upon experts to guide our suicide prevention procedures. We will work toward this goal so long as we have suicidal inmates in our custody.”

Inmates referred for evaluation for suicide risk assessment will be kept under “constant watch” until they have been evaluated by a mental health professional, according to the agreement terms. These evaluations will be conducted out of cell and in a confidential setting.

Attorneys for inmates sought new protections following the suicide of inmate Jamie Wallace. Wallace hanged himself days after testifying in the class-action lawsuit filed by inmates against the state prison system.

The state has denied that Alabama inmates receive inadequate mental health treatment.

Wallace testified at the Dec. 5 opening of the federal trial. Wallace described having multiple psychiatric disorders and claimed a prison officer once offered him a razor to use to kill himself. He also testified he had tried to hang himself at least once before.

Wallace was serving 25 years for murder in Jefferson County, where court records show he pleaded guilty in 2011 to killing his mother, Michele Ann Wallace. Wallace initially pleaded not guilty by reason of mental illness.