MONTGOMERY, Ala. — A federal judge on Friday gave final approval to a lawsuit settlement regarding how inmates with disabilities are housed in Alabama prisons.

U.S. District Judge Myron Thompson signed the agreement reached between inmates and the Alabama Department of Corrections. The state prison system agreed to survey prison facilities and make changes to settle claims brought by inmates under the Americans with Disabilities Act and the Rehabilitation Act.

The department will have 32 months to make any architectural changes required to make sure inmates with disabilities are appropriately housed and can access prison programs and facilities. The state also agreed to screen inmates for physical, mental or intellectual disabilities and to hire and train ADA coordinators.

Disabled inmates said in the 2014 federal lawsuit that they were kept in facilities that couldn’t safely accommodate them, were denied access to prison education, work release and other programs because of their disabilities and were sometimes inappropriately housed with higher security inmates solely because of their disabilities. During a fire, a prisoner in a wheelchair had to maneuver deeper into the prison to access a ramp to the outside, according to the lawsuit.

Thompson had given preliminary approval to the settlement in June.

“The Alabama Department of Corrections is committed to meeting its obligations as set out in the settlement agreement,” Commissioner Jeff Dunn said in a statement.

Thompson praised both the inmates who brought the lawsuit and the state prison system for agreeing to make changes.

“This settlement reflects the Alabama Department of Corrections’ commitment to making manifest the rights of disabled prisoners in its custody; it represents the shouldering of significant responsibility, and presents an equally significant opportunity, by delineating a years-long process of ensuring compliance with the dictates of federal disability law,” Thompson wrote.

Thompson wrote that the federal laws were meant to protect people with disabilities from being shunted and ignored.

“Prisoners, looked down upon by society and hidden from public view, are likewise at risk of such treatment. Absent the protections created and processes mandated by the ADA and accompanying regulations, and without effective oversight, prisoners with disabilities are doubly damned,” Thompson wrote.

The issue of housing for disabled inmates is part of a broader lawsuit filed by inmates over prison medical care. A group of inmates filed a civil lawsuit in 2014 that accused the state of failing to provide basic medical and mental health care.

Those claims have not yet gone to trial.