Inmates found incompetent to stand trial will now be admitted promptly to a mental hospital for treatment under an agreement between the state health agency and several advocacy groups, the groups announced Tuesday.

The settlement, which is awaiting U.S. District Judge Shelly Dick's approval, will end the long waiting list for the admission of prisoners with mental illness to the state mental hospital, the Advocacy Center of Louisiana and the Roderick and Solange MacArthur Justice Center in New Orleans said in a news release.

A civil rights lawsuit filed by the groups in Baton Rouge federal court in November alleged that mentally ill people found incompetent to stand trial are languishing in parish jails instead of receiving timely state treatment to restore their competency.

The Louisiana Department of Health, under the settlement terms announced Tuesday, will expand its bed capacity over the next eight months so mentally ill inmates committed to the department's care will be admitted to the state hospital in Jackson within 15 days.

"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 jail and into the therapeutic environments where they can receive appropriate treatment," Advocacy Center attorney Ronald Lospennato said.

Samantha Faulkner, a spokeswoman for the Department of Health, said the department had nothing to add to what the advocacy groups released.

Lospennato noted that the number of jailed men and women with severe mental illness has grown tremendously in recent years due to state funding cuts for mental health services.

"It is inhumane and discriminatory to jail people because of their mental disabilities," he added.

Under the settlement agreement, all inmates ordered to the health department's custody for competency restoration or care after being found not guilty by reason of insanity will be screened to determine if they are in acute or emergency need of mental health care. If found to be in need of such care, they will be admitted to the hospital within two days.

Top stories in Baton Rouge in your inbox

Twice daily we'll send you the day's biggest headlines. Sign up today.

The agreement also calls for the department to consult with the advocacy groups to develop a plan to provide more community placement options, such as group homes in major cities, for people whose mental health has improved with treatment so that they are not dangerous.

MacArthur Justice Center attorney Eric Foley, who said the agreement will be in place for at least four years, said additional community placement options will allow those people "eventually to be reintegrated into their communities and have increased contact with family and loved ones."

Foley said he could not comment on how the cash-strapped state will fund the changes contained in the agreement.

"The agreement contains robust monitoring and enforcement measures to ensure compliance," he said. "We believe the state is entering into this agreement in good faith and with the aim of resolving this long-standing problem."

A similar lawsuit filed in 2010 in New Orleans federal court led to a consent decree aimed at getting people declared incompetent to stand trial moved more quickly to the state mental hospital in hopes of having their competency restored.

The health department, under the decree's terms, was required to ensure that an incompetent person's wait time for admission to the state hospital was no more than 45 days following the order for inpatient treatment.

A New Orleans federal judge, Sarah Vance, dismissed the 2010 suit in late 2014. The decree had been in effect from mid-2011 until mid-2014.

The settlement now before Dick, of Baton Rouge, involves a 2014 lawsuit filed on behalf of those found not guilty of a crime by reason of insanity, and the November suit that dealt with those found not competent to stand trial.

Follow Joe Gyan Jr. on Twitter, @JoeGyanJr.