When Lockinvar Jacobs stepped off the bus at LA’s Union Station last summer, he wasn’t quite sure where to go. The 49-year-old schizophrenic had just been released from state prison, where he’d done a five-year bid for felony drug sales. It wasn’t his first time getting out of the big house; he told me, when we spoke recently, that he’s spent between 16 and 20 years of his life behind bars for drugs and other nonviolent felonies, such as burglary. He couldn’t be sure of the exact number, he said, because the Haldol and other meds have clouded his memory. What he was sure about was that this last time, he was released without his medication.

Jacobs had less than 48 hours to report to a county probation officer; if he failed to appear, he could face “flash incarceration,” meaning he’d get tossed into LA County Jail for a week or two. California prisons provide up to $200 gate money for releasees, but Jacobs needed clothes before he left the prison, for which the state had charged him $43. With $157 left over, his first stop would be a Skid Row shelter he knew well. There, he was told the probation office was several miles and city bus rides away. His cash didn’t last long. “I wasn’t very smart at handling my money,” he told me, a coy smile lighting up an otherwise hangdog expression. But he was able to report on time.

At the probation office, an on-site Department of Mental Health worker gave him a referral to a doctor, but no medication. Like approximately half of those who get a mental-health referral from DMH, Jacobs didn’t make it to his appointment. Without his meds, he had one of the “nervous breakdowns” he’s been experiencing since the 10th grade, some of which have required long-term hospitalization. Wandering Skid Row for hours in a speechless stupor, taunted by voices in his head, dehydrated by Southern California’s hot autumn sun, Jacobs collapsed to the sidewalk and sat against a wall, nearly catatonic, until someone finally called the cops.

California holds the distinction of having more prisoners than any other state, and is sixth per capita (Louisiana tops the list). Even that is no small feat when you consider that the US has the highest per capita incarceration rate of any country in the world, with more than 1.5 million inside state or federal prison walls at any given time. The Golden State, as people like Jacobs have learned, is more like the Gulag State.

Most of California’s prisoners, on whom it spends at least four times as much as it does on its K–12 students, are caged near outposts like Lompoc or Fresno or facilities far enough away from population and media centers that it’s easy to forget they exist. The number of prisoners reached such levels that by 2006, California was embroiled in two class action suits alleging that the overcrowded conditions in which the state was housing its convicts prevented the Department of Corrections from providing adequate health care. This, the suits alleged, violated the ban on cruel and unusual punishment in the Eighth Amendment of the US Constitution. Brown v. Plata, the case consolidated from the two class actions, went to the US Supreme Court, which ordered the state to thin the ranks of its prisoners to a still-crowded but barely acceptable 137.5 percent of total capacity.

That was in the summer of 2011. In October of the same year, Gov. Jerry Brown signed Assembly Bill 109, the intent of which was to reduce the state’s burden by shifting responsibility for many prisoners to California’s 58 counties. Contrary to popular belief, A.B. 109 did not call for the early release of prisoners. Rather, state prisoners whose most recent crimes — the ones for which they were doing time — were nonviolent, nonsexual, and nonserious felonies (called N3 crimes) are now turned over to the counties that prosecuted them. (To be sure, this includes N3s who have committed past crimes that were more serious. This glitch in the law has been widely criticized, especially in light of a murder committed by a homeless man on the streets of Hollywood not long after his release.)

Some 18,000 ex-cons have come back to Los Angeles County since the passage of A.B. 109. Of those 18,000, an astonishing 8,300 are in the county’s Department of Mental Health database because of some history of mental illness, be it garden-variety depression or anxiety, PTSD, personality disorders, or schizophrenia.

As A.B. 109ers have surged into LA County in the last couple of years, the law has revealed a dirty secret that most in the United States, including its elected officials, would rather not confront: The prison system has become the mental health system. Funding for rehabilitation programs was cut in recent decades amid a frenzy of law-and-order vindictiveness and with little regard for how it might affect recidivism, crime rates, or costs. Meanwhile, mental health treatment is valued less by the health care system than treatment for maladies occurring below the neck. So it should be no surprise that mentally ill criminal offenders, sometimes referred to by the acronym “MICOs,” aren’t getting very good treatment either in prison or after they’ve done their time.

Former Rhode Island congressman Patrick Kennedy is the author of 2008’s Mental Health Parity and Addiction Equity Act, which sought to force health insurance companies to offer better coverage of mental health. “While the old model of warehousing the mentally ill [in psych wards] might seem like ancient history,” he says, “history has in fact repeated itself in the context of prison.”

Had someone like Lockinvar Jacobs committed a crime in certain other countries, things would have been different. In England, for example, he’d have been sent to one of many new “diversion sites,” where proper treatment is available. In a country such as Finland or Denmark, a mentally ill offender would have received a different sentence in the first place, or no sentence at all, and been sent to a treatment center.

Jacobs was lucky enough to be taken to a hospital after he collapsed on Skid Row, where he got his prescription filled and received IV nutrition during a 15-day stay for observation. On release, he could have wound up in any number of scenarios: the street, a shelter, a halfway house with full services for the mentally ill (called a step-down facility), or, if things had really spiraled, a lockdown psychiatric ward. The Department of Mental Health referred him to the Amity Foundation, which houses and feeds some 50 A.B. 109ers among its clientele of 200 other destitute individuals.

Four days a week, Jacobs makes the hour-long round-trip bus-and-foot journey to Project 180, a treatment center that receives funding through A.B. 109, and provides programs in basic life skills such as hygiene and use of public transportation, as well as individual and group therapy.

While Amity can be lenient with time limits, other providers have to send clients away after six months. Jacobs could soon be on the street, where he’s less likely to get his meds, more prone to schizophrenic episodes, and more likely to re-offend. If he slips up, he’ll be sent to LA County Jail. There, he’d get his meds, but on release he’d be out on the streets again, this time with nothing but the clothes on his back and a paper prescription, which he’d then need to have filled.

Amity Foundation’s California vice president, Mark Faucette, arranged for me to interview half a dozen mentally ill A.B. 109ers. Gathered around a boardroom table, they told me their criminal and mental health histories. There was Janet, a 45-year-old Latina who’d spent half her life in prison, serving six terms for drug possession or sales charges. She told me she hears voices in her head when she’s off her medication, and by her vacant stare, I didn’t doubt it. We spoke about her many transgressions, which had earned her a term in prison, followed by a recent stint in LA County Jail for selling dope to feed her habit. (She certainly wasn’t feeding herself; Janet looked life-threateningly thin.) “When I got out of jail this time I still didn’t have no medication,” she said. “I [couldn’t] see a psych doctor until a month later. I don’t think that shouldn’t be like that.”

It may be easy to dismiss the claims of a mentally ill drug addict who’s spent so much time in prison, but even if Janet was bending the truth, it was clear that the odds were against her. Getting out of prison can be a challenge for the most able-minded among us. Marginalized or locked up long ago, many have no family, no resources, and no home.

Troy Vaughn, chief program officer at Lamp Community, a homeless-services provider, explained it to me this way: “If I’ve been incarcerated for a period of time, even if it was a year, I come out and society looks different,” he said. “That’s one barrier that I have to address.” Making things more difficult, A.B. 109ers must now navigate county red tape, rather than state agencies they’ve grown accustomed to while cycling through the system. Mental illness compounds these challenges, says Vaughn, a former Marine who was homeless and addicted to drugs and spent nearly a year in LA County Jail in the early 1990s. Anyone whose sanity has been challenged by a trip to the DMV can relate to that idea.

Hearing Janet talk underscored what Vaughn had told me. She seemed to barely understand the difference between state parole and county probation, and without help from Faucette, her explanation of how she’d navigated various state bureaucracies would have been incomprehensible. How, I wondered, could someone like Janet be expected to show up for appointments, stick to a regimen of meds, and stay out of trouble without regular, maybe even daily, therapy and guidance?

Antoinette had a slightly easier time. As instructed, she went straight to the probation office after her release; she told me she was put on a two-week waiting list to get an appointment to re-up her meds. With nowhere to go, she managed to find housing through a friend until she was referred to Amity.

I also met Anthony, a schizophrenic with a history of crack addiction who had a hard time remembering the most basic recent events of his life.

So old and co-occurring were George’s disorders that he wasn’t sure if the meth caused the voices in his head or if he used the drug to quiet them.

As recently as the early 1960s, MICOs like the ones Amity is trying to help would have been involuntarily committed to a psychiatric ward, the type of place that was famously, and accurately, portrayed in the book and film, One Flew Over the Cuckoo’s Nest. That began to change in 1963, when John F. Kennedy signed the Community Mental Health Act, the intent of which was to fund local services so those in need could avoid such a fate. The mentally ill, JFK memorably said, had for too long been “alien to our affections.”

Similar congressional measures followed, but funding didn’t, leaving few resources for the mentally ill. With the best intentions, California in the late 1960s passed the Lanterman-Petris-Short Act, which practically did away with involuntary commitment in the state. Trouble was, it left many vulnerable Californians to depend on a disintegrating mental healthcare system. Suddenly, the streets became a de facto mental hospital — with no staff. What happened next is no surprise. As the psychiatrist Marc Abramson wrote, law enforcement began to “regard arrest and booking into jail as a more reliable way of securing involuntary detention of mentally disordered persons.”

Under President Reagan, federal funding for mental hospitals dwindled and the cycle continued. With fewer community services in place, mentally ill criminal offenders began finding themselves on the street and then behind bars, where a culture of chaos, stigmatization, and abuse by prisoners and guards would exacerbate their afflictions.

Patrick Kennedy, who has been treated repeatedly for drug and alcohol addiction and is now in recovery, is an advocate for improving mental health care and policy through his Kennedy Forum, which aims to “remove the stigma surrounding mental illness and to once and for all achieve parity by treating the brain the same way we treat the rest of the body.” He attributes the over-incarceration of the mentally ill to an archaic lack of understanding of the science of mental health. Though in years past mental health disorders could be attributed to moral or character failings, we now know that mental health disorders are often physiological, no different from a patient having type 1 diabetes. Neuroscientists are looking at brain-imaging technology as a possible way of making earlier assessment of mental illnesses so that patients can receive intervention and targeted treatment plans. Still, Kennedy said, the belief persists that “health issues of the brain aren’t as valid as issues of the body.” The product of such thinking, he continued, is that “the more you ignore [mental illness], the worse it gets.”

Amity’s Mark Faucette, who daily sees the results of untreated mental illness, concurred. “The only way to make any kind of headway,” he said, “is to have the right treatment services set up in the community.”

Even if those services were in place, organizations like Amity would just be fed a constant stream of mentally ill people from a health care system that turns its back on the sick by not incentivizing early diagnosis and treatment. Mental illness usually begins long before sufferers have run-ins with the law or descend into dysfunction; half of mental health disorders are diagnosable by age 14, when they can be treated before blossoming into full-blown mental illness or drug addiction. But the health care system often doesn’t identify and provide treatment for these people, even though depression is the country’s No. 1 disability and mental health disorders have overtaken physical disorders as the most predominant among kids. With any luck, this will change under Kennedy’s mental health parity law, which is only just going into effect, five years after passage.

It follows, of course, that proper treatment is also the best way to prevent people from joining (or rejoining) the ranks of the incarcerated. It’s also cheaper to keep someone healthy outside of prison walls than it is to lock him or her up — and not give treatment. To say nothing of kinder.

Under A.B. 109, county officials decide how to divide the funds among agencies handling the influx of offenders. For fiscal year 2012–13, LA County allotted $73.8 million to the Probation Department and $149.5 million — nearly 60 percent of the budget — to the Sheriff’s Department. According to numbers provided by the sheriff’s spokesperson, $139 million went to “custody beds” for A.B. 109ers who re-offend, or new offenders who commit N3 crimes. No A.B. 109 money was allotted for in-jail services such as therapy or life skills courses, according to the breakdown. The Department of Mental Health received $24.3 million.

That the county spends 5.7 times more on incarcerating MICOs than it does on their mental health care is a source of frustration for people such as Peter Eliasberg, the rumpled and fiercely articulate legal director of the ACLU Foundation of Southern California. “We’ve just chosen to replicate at the county level what the state did for 30 years,” he said, sipping yerba maté from a handcrafted gourd.

On any given day, around 5,000 alleged offenders are held in LA County’s Men’s Central Jail; by some counts, more than half have some form of mental illness, and 1,000 or more mentally ill are often housed among the general inmate population. Men’s Central is infamous for its cold temperatures and dungeon-like atmosphere. Last July, when LA Times columnist Steve Lopez (whose acquaintance with a mentally ill resident of Skid Row was depicted in the film “The Soloist“) asked a jail psychologist what “makes a desirable therapeutic environment,” she simply told him, “This ain’t it.”

The jail, which the ACLU claims is the world’s largest, is known by its own top brass as “the nation’s largest mental institution.” What’s more, Men’s Central has become notorious for violence by inmates and sheriff’s deputies, often against the mentally ill. A federal investigation into abuse of inmates made headlines late last year when 18 current and former deputies were indicted. Under pressure, the head of the department, Sheriff Lee Baca, resigned in January. All the while, the jail has gotten so crowded and decrepit that county officials are considering a billion-dollar teardown and rebuild of the facility to bring it out of the Dark Ages.

Though a new jail would, in theory, be a better environment for the mentally ill (and everyone else), advocates point out that jail, no matter how modern the facility, is still a place to incarcerate, not rehabilitate. As Eliasberg puts it, mentally ill criminal offenders still need to be seen “as a whole human being.”

Instead, he said the county’s attitude can be read by its budget allocation. What it is essentially saying, Eliasberg told me, is “We’re going to need more mental health beds, and one of the principal reasons is that we don’t spend enough money on community treatment.” He added, “The irony of that is blinding.” Eliasberg and others feel that if the county provided more funding for community treatment, then it would need fewer jail beds.

None of LA’s five county supervisors — the officials who decide how the funds should be divided — would comment. Anna Pembedjian, justice deputy for Supervisor Mike Antonovich, told me that her boss is “a strong proponent of mental health services to individuals who frankly don’t have the mental capacity to voluntarily choose mental health services.” She then implied that even if the money were made available, there’d be no one to put it to use. “There’s actually not a lot of community-based organizations that provide the sort of bed treatment that [you’re asking] about,” she said. She was referring to a shortage of treatment beds at service providers that are on contract with the county. “I take that not as a lack of county investment,” she said.

In fact it’s just that. With a bigger chunk of the A.B. 109 budget, the Department of Mental Health could expand capacity and staff at existing facilities, or contract with new ones. “That’s just one example of how money could be put to good use,” said Peggy Edwards, executive director at the advocacy group Los Angeles Regional Reentry Partnership. Edwards noted that such investment could also be spent on personnel who could help mentally ill patients like Lockinvar Jacobs and Janet, who have had trouble navigating bureaucracies and keeping appointments, to get from the sites where referrals are given to their actual appointments.

When I asked the board’s CEO to explain the division of A.B. 109 money, a spokesperson informed me, via email, that “budget allocation between the County departments reflects our chief priorities in mitigating the impacts A.B. 109 has on our communities.” Priority No. 1, he said, was “safeguard[ing] public safety by providing custody and supervision.” In other words, the money is divided based on the assumption that it’s too risky to not lock people up, even if treatment could make society safer in the long run.

In theory, A.B. 109 keeps offenders closer to home, where the fortunate ones have family or friends to soften their landing in the real world. But it all depends on how a county handles its influx of MICOs. Other counties in California seem more committed to policies that will succeed at preventing recidivism among that population, who are re-incarcerated ata rate even higher than the general population’s 52 percent.

A notable example is Contra Costa County, east of San Francisco. There, before a prisoner is released, someone from the Probation Department meets with the offender and prison officials to create a course of action. Then, said the county’s chief probation officer, Philip Kader, “we try to coordinate with mental health services, housing, county social services. We try to get [offenders] enrolled in MediCal, try to get all those things done before they exit the facility.” In that way, the country can “ensure in the best way we can that they’re getting to appointments.”

Contra Costa D.A.’s are proponents of “split sentencing” for N3 offenders, Kader said, meaning convicts spend less time in jail and more time in the community, under the supervision of probation agents. Under split sentencing, mentally ill offenders are able to seek counseling in a healing environment, rather than an oppressive one. Ninety-two percent of Contra Costa’s N3s receive split sentencing; in L.A. County, that figure is around 5 percent.

And in San Diego County, every A.B. 109er coming out of prison is transported “to a community transition center before they even hit the street,” said County Probation Division Director Scott Huizar. The transition center even serves as a stopgap home for up to 60 A.B. 109ers. “We try and get them in and out within a period of seven days,” said Huizar, but “we’ve had offenders there a number of weeks” while waiting for space at a drug or mental health treatment center.

While Contra Costa and San Diego counties don’t yet have data to show long-term results, other places have shown that programs like the ones those counties have implemented offer the chance of success. Florida’s Miami-Dade County’s misdemeanor prison diversion program, now in its 14th year, has prepared more than 4,000 law enforcement officers to handle mental health crises among civilians. The program is the result of a summit called by Judge Steve Leifman, in which “[there] was a realization that we had an embarrassing, dysfunctional system and it was abusive and not accomplishing anything positive and people just kept re-cycling,” he said.

Leifman said that since the start of the program, law enforcement has responded to approximately 10,000 calls involving the mentally ill. “Out of the 10,000 calls, [officers] only made 27 arrests, which resulted in a decrease of our jail [population] from about 7,800 to 5,000,” Leifman said. (That’s a 36 percent drop, which is more than the prisoner reduction mandated by the Supreme Court.) At the same time, he said, there hasn’t been a shooting by a mentally ill offender “in a really long time.” Inspired by the program’s efficacy, Miami-Dade applied it to nonviolent felons, who Leifman says recidivate at a rate even lower than misdemeanor offenders. Thanks to the program, the nonviolent felon population is holding at 6 percent, he said. It’s been such a success that Miami-Dade County closed one of its jails for lack of inmates, saving taxpayers $12 million a year.

For good measure, Miami-Dade started a program with the American Psychiatric Association that trains every middle and high school teacher to recognize signs of mental illness so that kids can be treated early and become functioning, psychologically sound adults.

Last year, a few city and county officials from Los Angeles paid a visit to Miami, where Leifman showed them around. He said they seemed impressed by what they saw, and he assured them that what Miami was doing could work elsewhere, even in a massive county like L.A.

Over at Lamp Community, Troy Vaughn couldn’t agree more. “I’m the evidence,” he said. “I walk around every day as evidence. I’m the evidence that recovery of a person with mental illness, depression, anxiety, substance abuse issues, estrangement from society is a person who can be redeemed. I’m the living proof that it’s possible.”

This story was reported in partnership with The Investigative Fund at The Nation Institute, now known as Type Investigations.