DES MOINES, Iowa — A new law signed Thursday by Iowa Gov. Kim Reynolds expands mental health services across the state.

The law creates six access centers to provide short-term care for people in crisis and doubles the number of teams across the state that provide 24/7 flexible treatment and support to patients.

The nonpartisan Legislative Services Agency estimates the total cost at more than $31 million over two years. Funding would come from federal, state and local taxes. Iowa’s 14 mental health regions would spend down excess cash reserves to pay for initial costs.

The law adopts recommendations made by a stakeholder group that examined ways to help Iowa residents with mental health and substance abuse issues. The group began to find ways to address a shortage of psychiatric hospital beds in the state, especially after the 2015 closing of state mental health institutes in Clarinda and Mount Pleasant.

Marilyn Rhoten, vice president of behavioral services at CHI Health, which provides inpatient psychiatric services in southwest Iowa, served on the group and said some patients can occupy beds for months. The access centers along with intensive residential service homes to provide help to up to 120 people should free up beds for acute psychiatric patients.

Peggy Huppert, executive director of National Alliance on Mental Illness-Iowa, said the legislation establishes specific deadlines and objectives, making it easier to hold everyone involved accountable. She said it’s up to everyone involved to work together to ensure it gets implemented properly.

“Believe me, if it doesn’t, we’ll be shouting about it,” Huppert said.

Clive resident Mary Neubauer, who is an Iowa Lottery vice president, said her family was frustrated by Iowa’s lack of mental health resources when they sought treatment for her 18-year-old son, Sergei, who killed himself last fall. He went to mental health facilities in Arizona and California, and Neubauer said having to seek help out of state “was a factor in what happened to him.”

She praised the legislation — which received unanimous approval in the Legislature — as making critical improvements to mental health services, particularly by creating more residential treatment options.

“This was exactly the kind of care that our son needed and that we could not find in Iowa,” Neubauer said. “Does that bill fix everything that’s wrong here in Iowa? No. I think it is a good start.”

The legislation focuses on adults, but Reynolds said she plans to issue an executive order in the coming weeks to establish a platform for a children’s mental health service system.

“We can and must do better for Iowa’s children,” Reynolds said.

Reynolds also signed a bill Thursday requiring Iowa school districts to train educators on how to identify and help students at risk of suicide.