By the time the Minnesota Office of the Legislative Auditor decided to tackle the issue of mental health in jails, the topic had become a source of frustration throughout state government. Agencies from the Department of Human Services to the Office of Justice Programs had been asking the auditor for some time to look more deeply into the problem.

The auditor’s findings, while scathing, weren’t necessarily surprising. About two-thirds of inmates who had been deemed mentally incompetent to stand trial were sitting in jail while the courts decided what to do next, in violation of state law. There was a general lack of mental health services in the state’s jail system. The audit also found no reliable data on how many inmates were suffering from mental illness, as well as little compliance with a state law requiring that a mentally ill prisoner have a “discharge plan” before leaving jail.

“It was definitely one of our most recommendation-heavy audits,” says Joel Alter, evaluation coordinator for the legislative auditor. It’s an issue that all states are grappling with. The one overarching challenge, he says, is, “How do we get people whose primary issue is mental health out of our jail and prison system?”

While the audit states that Minnesota doesn’t have reliable data on how many people with mental illness are in its justice system, surveys suggest that the number is about one-third of the total jail population. That’s roughly the same percentage as in New York City and Cook County, Ill. The national average is about 20 percent for jails and 15 percent for prisons, according to the nonprofit Treatment Advocacy Center.

As in other states, Alter points to deinstitutionalization -- the closing down of state-run psychiatric hospitals -- as the reason why jail became Minnesota’s de facto solution for housing the mentally ill. At its peak in the late 1950s, the state had some 16,000 beds in those facilities; now there are just a few hundred. While at one time “we had too much institutionalization,” he says, “now we have something dramatically different that is still not effective.”

Kathy Sheran, chairwoman of the Minnesota Senate’s Health and Human Services Committee, points to what hasn’t happened in the course of deinstitutionalization. “We haven’t built up community-based mental health services like we were supposed to, and we haven’t created job-building programs for this population,” she says. “Instead, we’ve been doing these patchwork fixes, and it’s created enormous problems.”

Initiatives to build up mental health services are steps in the right direction, says Alter. But he adds that “jails can’t just punt this problem to the health-care system. They do need to provide a minimum standard of care.”

John Monahan, a University of Virginia professor who is an expert on mental health law, points to New York Mayor Bill de Blasio’s $130 million “action plan” on behavioral health and the criminal justice system as a major step in the right direction. Over the course of four years, the initiative aims to train officers on how to respond to someone with a mental illness, implement physical and mental health screenings before arraignment, and expand the number of people who can participate in a supervised release program.

De Blasio’s approach involves a huge investment, even for a city as big as New York, and there’s no guarantee that it will succeed. But the effort reflects the arguments of advocates that getting the justice system and the public health system to work in concert is part of the solution.