MARYSVILLE, Calif. (AP) — A Northern California county is agreeing to improve mental health care at its county jail to settle a lawsuit alleging there were at least 41 suicide attempts in less than three years.

Yuba County's attorneys said in a statement Thursday they do not agree conditions at the jail are below legal requirements.

But the county is agreeing to review suicide hazards, improve medical and mental health care, increase mental health care staffing and update policies on housing inmates experiencing a mental health crisis. It's also agreeing to provide detainees with more time out of their cells including for exercise and recreation.

It also will provide more access for inmates with disabilities and will have incoming detainees examined by medical instead of correctional employees.

A federal judge must approve the settlement.