The Louisiana Department of Health has agreed to create a new plan for community-based mental health services after the U.S. Department of Justice argued the state’s use of nursing homes to treat those with serious mental illness is a Civil Rights violation.

The Justice Department’s complaint alleges that Louisiana places “undue reliance” on providing services in institutionalized settings such as nursing facilities, instead of in the community. Under the agreement announced Wednesday, Louisiana will create and implement a plan to expand community-based services like mobile crisis, case management, assertive community treatment, and supported housing to meet patient needs in the community.

The state must also assess all existing nursing facility residents with mental illness to determine whether they need new referrals for admission or if they can be served appropriately in the community.

In its complaint, the government argued that Louisiana’s nursing facilities are “segregated, institutional settings, where residents are unable to interact with people without disabilities to the fullest extent possible.”

“People confined to those nursing facilities lack meaningful opportunities to choose roommates, friends, living arrangements, daily schedule, or even food and mealtimes,” Justice Department officials wrote. “They lack meaningful choices for work or other ways to spend their days. Many facilities in the State have locked exits, and some also have locked gates around the building exterior. They are largely isolated from the larger community.”

Skilled nursing settings were found lacking for many patients with mental health diagnoses because the Americans with Disabilities Act requires public entities to administer services in the least restrictive setting possible.

Last year, the Kansas City Star reported on the growing trend of warehousing mentally ill patients in nursing homes more suited to geriatric residents.

The newspaper found states regularly turn to skilled nursing homes because there hasn’t been enough support for community mental health services developed when mass institutionalization began being phased out in the late 1980s.

In a press release, Acting Assistant Attorney General John Gore praised Louisiana “for committing to take the steps necessary to ensure that people with serious mental illness have the opportunity to live, work, and thrive in their own communities instead of being unnecessarily segregated in nursing facilities.”