BANGOR  — The state of Maine has agreed to a plan that will help some of the state’s disabled residents receive services that will let them live outside nursing homes.

In a settlement to a class-action lawsuit, the Department of Health and Human Services agreed to provide disabled people with normal mental function, the same level of services available to Mainers with mental retardation or other developmental disabilities.

The lawsuit was originally brought by three men with physical disabilities but normal mental function. The case eventually involved more than 40 people.

The Bangor Daily News says the lawsuit alleged that MaineCare violated federal law by refusing to pay for support services that would allow the plaintiffs to live in a community setting instead of in nursing homes.