While we waited for the doctor to evaluate him, my father did what mental health professionals refer to as double-bookkeeping. He remembered most of what transpired earlier in the day but still believed he was in the hospital to have his pacemaker checked. Even as we laughed together, I knew what would come: the psychiatrist would ask him about his behavior, and my father would deny all the paranoia, delusions and violence. He would curse and yell and try to walk out of the room. When the police officer stopped him, he would become enraged. And when I confirmed for the doctor that he had indeed done these things, and that we, his family, were asking that he be hospitalized, he would stop calling me String Bean. He would stop speaking to me at all.

Until the late 19th century, mentally ill people were locked in prisons or left to wander the streets. Reformers, seeking a more humane response, created a vast system of state-run psychiatric hospitals. By the 1960s, however, the overcrowded, often disturbing conditions in those facilities had come to light. At the same time, new psychiatric medicines were being developed, all of which gave rise to a new reform effort. Deinstitutionalization, the systematic closure of state psychiatric hospitals, was codified by the Community Mental Health Centers Act of 1963 and supported by patients’ rights laws secured state by state. Chief among those laws were strict new standards: only people who posed an imminent danger to themselves or someone else could be committed to a psychiatric hospital or treated against their will. By treating the rest in the least-restrictive settings possible, the thinking went, we would protect the civil liberties of the mentally ill and hasten their recoveries. Surely community life was better for mental health than a cold, unfeeling institution.

But in the decades since, the sickest patients have begun turning up in jails and homeless shelters with a frequency that mirrors that of the late 1800s. “We’re protecting civil liberties at the expense of health and safety,” says Doris A. Fuller, the executive director of the Treatment Advocacy Center, a nonprofit group that lobbies for broader involuntary commitment standards. “Deinstitutionalization has gone way too far.” According to Fuller’s group, there was one public psychiatric bed for every 300 Americans in 1955; by 2012, that number was one for every 7,000. That’s less than a third of what is needed, the organization asserts. The recession has made matters worse: since late 2008, more than $1.5 billion has been cut from state mental health budgets across the country. In the past two years alone, 12 state hospitals with a total of nearly 4,000 beds have either closed or are in danger of closing.

Already patients in crisis can spend several days in an emergency room waiting for a psychiatric bed to become available. In New Jersey, it can take as long as five days; in Vermont — where, as Bloomberg News recently reported, there are virtually no state psychiatric beds left — severely mentally ill patients have been handcuffed to emergency-room beds. For lack of other options, many patients who clearly meet the imminent-danger standard are released. “The lack of resources has triggered a devolution of the standard,” says Robert Davison, executive director of the Mental Health Association of Essex County, a nonprofit group that connects patients to services in northern New Jersey. “Twenty years ago, ‘imminent danger’ meant what most people think it means. But now there’s this systemic push to divert people away from inpatient care, no matter how sick they are, because we know there’s no place to send them.”

When I asked Davison for specific examples, he rattled several off the top of his head. A man who was convinced that aliens were on the roof and that bugs were coming out of the walls and who would not sit on furniture but only lie on the floor was not committable. Neither was the man who refused medication and mutilated his own testicles. Nor the woman who wouldn’t eat because she believed the C.I.A. was trying to poison her. “It is unbelievable the condition of people who are found not to meet the standard,” Davison says.

Despite agreement that more services are urgently needed, families, doctors and policy makers are divided over what kind of services. Those concerned about civil liberties and state budgets want to close state psychiatric hospitals and divert more patients to community-based programs and short-term-care facilities. But others argue that not every patient can thrive in a community setting or recover in just a few weeks’ time. Meanwhile, outpatient commitment laws — which would enable some patients to live in the community, provided they adhere to a treatment plan — confront the same opposition as inpatient commitment: namely the concern that they violate civil liberties or are too expensive to implement or both. “We say a better system would cost too much,” says Marvin Swartz, a researcher at Duke University who has studied mental health systems for the past two decades. “But we’re spending more money ignoring the problem than we would have to spend to address it.”

During the three months in which my father cycled through the system, he racked up five emergency room visits, four arrests, four court appearances, three trips to PESS and too many police confrontations to remember. He spent 25 (nonconsecutive) days in a psychiatric hospital and 40 in a county jail. The medical expenses alone — not including the police hours, jail time or court costs — ran upward of $250,000. These were costly months indeed — to the institutions forced to deal with him and, in more ways than one, to our family.