California insurance regulators have reached a settlement with Kaiser Permanente to address its repeated failures to provide patients with timely access to mental-health services.

Under the agreement — the result of two years of negotiations between the state Department of Managed Health Care and Kaiser Foundation Health Plan — Kaiser has agreed to hire an outside consultant for three years to help it address the access problems and improve oversight of its behavioral health program.

The agreement also acknowledges steps the plan has already taken to improve access, including hiring 850 additional behavioral health therapists in the past five years. (Kaiser Health News, which produces California Healthline, is not affiliated with Kaiser Permanente.)

“This is a really huge deal, and it’s going to impact the lives of millions of Kaiser [health plan] members who need mental health services,” said Shelley Rouillard, director of the managed care department, one of the state’s two insurance regulators. “For the first time I’m aware of, Kaiser has committed to fixing the access problems that their enrollees have had in regards to mental health services.”

The plan agreed to make corrections in six areas, including identifying all patient requests for appointments that do not meet the state’s “timely access” rules. If the plan fails to meet benchmarks laid out in the agreement, it could incur up to $1 million in fines.

In a statement posted on the Kaiser Permanente website, Dr. Patrick Courneya, Kaiser’s executive vice president and chief medical officer, wrote that the agreement “shows the path for continued improvement. More importantly, it is an acknowledgment of the significant achievements that Kaiser Permanente has made in our ongoing work to improve mental health care in California.”

The settlement follows years of warnings by the managed care department that Kaiser was violating state law by failing to get patients into appropriate treatment soon enough. As a result, Kaiser in 2013 agreed to pay a $4 million fine — one of the largest ever paid by an insurer in the state.

In 2015, the department found that some Kaiser patients still had to wait weeks or even months to see a psychiatrist or a therapist. In one example cited in its report, a sexual assault victim diagnosed with post-traumatic stress disorder and major depression was prescribed an antidepressant in an initial visit but struggled to obtain a follow-up appointment.

The patient, who was not identified, tried to get both individual and group therapy visits, according to the report. Her psychiatrist responded by “offering psychotherapy in the community at the patient’s expense and suggested that the patient investigate appropriate group therapy in the community because weekly individual therapy was not available in the Plan, and Plan group therapy did not address sexual assault.”

The patient was eventually able to schedule an appointment with a Kaiser therapist — five months after her initial visit, the report said.

Just last month, the department found that Kaiser had solved some of the deficiencies cited earlier but that other problems remained.

After each follow-up report from the state, Kaiser responded by saying it was proud of its progress on behavioral health and was committed to making further improvements.

Rouillard said the managed care department has been working closely with Kaiser on a settlement since the 2015 report.

“If we were to fine them another multimillion-dollar fine, that wouldn’t really fix the problem,” Rouillard said. “We really needed them to commit to spending their vast resources on fixing the problems.”

The agreement “closes out” the deficiencies identified in past surveys and “starts the clock all over again as of today,” Rouillard said.

Patients who experience problems with access to health care, whether they are insured by Kaiser or another plan, can contact the Department of Managed Health Care’s help center.

This story was produced by Kaiser Health News, an editorially independent program of the Kaiser Family Foundation.