Jawaun Westbrooks, a young man with a long history of mental illness, allegedly attacked two women with a hammer on Thursday near Navy Pier.

One woman suffered a head wound so severe it required 30 stitches to close.

Westbrooks was arrested, thank goodness, and jailed, of course. A man alleged to have attacked two strangers with a hammer can’t be allowed to run around loose.

But at Cook County Jail, it is worth noting, Westbrooks is hardly an outlier. At least 30 percent of the jail’s population — some 3,200 men and women — also suffer from mental illness. The county jail is in fact — and to our shame — the largest mental health hospital in the state.

This is what happens when financially strapped states and cities slash budgets, closing residential mental health facilities and community clinics, as Illinois and Chicago and much of the nation have done. Mental illness effectively becomes criminalized. For every clearly dangerous mentally ill person being held, such as apparently Westbrooks, dozens more are picked up for petty crimes they committed on the edge of survival and sanity, such as shoplifting.

Question is, just what does a compassionate society do? More to the point, what do Gov. Pat Quinn and his opponent in the November election, Bruce Rauner, propose we do? Or in a state drowning in red ink, must it be the weakest and least powerful, such as the mental ill, who suffer most?

“We’ve got to deal with this in a better way,” said Cara Smith, executive director of the Cook County Department of Corrections, describing the way mentally ill men and women bounce in and out of jail for lack of alternatives.

Westbrooks, 28, has been arrested 32 times, according to county records, and convicted seven times of assault, invasion of privacy and larceny. He has been admitted to the jail 10 times. And twice he was found unfit to stand trial and transferred immediately from the jail to the Department of Mental Health. The first time he was transferred, he had already spent 405 days in the jail; the second time, he had already spent 116 days in jail.

The degree to which mental illness is at the core of why somebody lands in jail, Dart pointed out, is revealed in the remarkably small offenses for which many of them were arrested in the first place. It’s not necessarily the crime, such as a minor theft, for which they are still locked up, but for their failure to follow through on the basics once released on bond, such as showing up for a court date.

If you are homeless, hungry and schizophrenic, Dart asks, “Where in the scale of concerns in your life is showing up for your next court date?”

The United States has never known a golden age of adequate care for the mentally ill. But state spending on mental health care in Illinois dropped precipitously from $590.7 million in 2009 to $403.7 million in 2012 and has not been increased since. Meanwhile, Chicago closed six of 12 mental health clinics in 2012, as part of a reorganization that city officials said would not reduce overall service, though Dart says it has.

Inmates admit to him frequently, the sheriff said, that when their clinic closed they couldn’t pull it together to find another clinic and take three buses to get there. “He’s just not gonna go,” Dart said.

A glimmer of hope in this sad story has been the introduction of the Affordable Care Act, which extends Medicaid eligibility to single poor men and women. But there again, Smith said, getting mentally ill people to sign up for Obamacare and helping them “navigate the system” is an enormous challenge.

Westbrooks’ mother, Theresa Jones, told a Chicago Tribune reporter that her 28-year-old son has struggled with mental illness since he was a teenager. “I’ve been trying to find help for him,” she told the reporter, “but it seemed like no one is willing to help.”

We can believe it.

Far too often in Cook County and Illinois, you have to go to jail for that.