NEW ORLEANS — Advocacy groups announced a federal court settlement Tuesday that they said will lead to hospital treatment, instead of incarceration, for mentally ill Louisiana inmates.

The MacArthur Justice Center and The Advocacy Center of New Orleans said in a joint news release that the federal court settlement case affects people tried and found not guilty by reason of insanity, as well as inmates found mentally incompetent to stand trial.

The release says the state Department of Health agreed to expand bed capacity over the next eight months so inmates with mental illness will be admitted within 15 days of being committed to state care — two days if they need acute or emergency mental health care.

Court records show a settlement was reached last week.

A state health department spokeswoman, Samantha Faulkner, said the department had no comment to add to the advocacy group’s announcement.

The settlement brings to a close litigation in federal court in Baton Rouge that dates back to 2010.

“We’re pleased that the Louisiana Department of Health has agreed to take steps to quickly move people with mental illness out of the parish jails and into the therapeutic environments where they can receive appropriate treatment,” Ronald Lospennato, an attorney for the Advocacy Center, said in the news release.

Lospennato, in a telephone interview, estimated that as many as 30 to 40 such inmates might in a jail, awaiting treatment, on any given day. He said the average wait for treatment of inmates found not guilty by reason of insanity has been 183.5 days, with some waits of more than a year.