It’s been just over twenty-five years since Prozac came to market, and more than twenty per cent of Americans now regularly take mind-altering drugs prescribed by their doctors. Almost as familiar as brands like Zoloft and Lexapro is the worry about what it means that the daily routine in many households, for parents and children alike, includes a dose of medications that are poorly understood and whose long-term effects on the body are unknown. Despite our ambivalence, sales of psychiatric drugs amounted to more than seventy billion dollars in 2010. They have become yet another commodity that consumers have learned to live with or even enjoy, like S.U.V.s or Cheetos.

Yet the psychiatric-drug industry is in trouble. “We are facing a crisis,” the Cornell psychiatrist and New York Times contributor Richard Friedman warned last week. In the past few years, one pharmaceutical giant after another—GlaxoSmithKline, AstraZeneca, Novartis, Pfizer, Merck, Sanofi—has shrunk or shuttered its neuroscience research facilities. Clinical trials have been halted, lines of research abandoned, and the new drug pipeline has been allowed to run dry.

Why would an industry beat a hasty retreat from a market that continues to boom? (Recent surveys indicate that mental illness is the leading cause of impairment and disability worldwide.) The answer lies in the history of psychopharmacology, which is more deeply indebted to serendipity than most branches of medicine—in particular, to a remarkable series of accidental discoveries made in the fifteen or so years following the end of the Second World War.

In 1949, John Cade published an article in the Medical Journal of Australia describing his discovery that lithium sedated people who experienced mania. Cade had been testing his theory that manic people were suffering from an excess of uric acid by injecting patients’ urine into guinea pigs, who subsequently died. When Cade diluted the uric acid by adding lithium, the guinea pigs fared better; when he injected them with lithium alone, they became sedated. He noticed the same effect when he tested lithium on himself, and then on his patients. Nearly twenty years after he first recommended lithium to treat manic depression, it became the standard treatment for the disorder.

In the nineteen-forties and fifties, schizophrenic patients in some asylums were treated with cold-induced “hibernation”—a state from which they often emerged lucid and calm. In one French hospital, the protocol also called for chlorpromazine, a new drug thought to increase the hibernation effect. One day, some nurses ran out of ice and administered the drug on its own. When it calmed the patients, chlorpromazine, later named Thorazine, was recognized in 1952 as the first drug treatment for schizophrenia—a development that encouraged doctors to believe that they could use drugs to manage patients outside the asylum, and thus shutter their institutions.

In 1956, the Swiss firm Geigy wanted in on the antipsychotics market, and it asked a researcher and asylum doctor, Roland Kuhn, to test out a drug that, like Thorazine, was an antihistamine—and thus was expected to have a sedating effect. The results were not what Kuhn desired: when the schizophrenic patients took the drug, imipramine, they became more agitated, and one of them, according to a member of the research team, “rode, in his nightshirt, to a nearby village, singing lustily.” He added, “This was not really a very good PR exercise for the hospital.” But it was the inspiration for Kuhn and his team to reason that “if the flat mood of schizophrenia could be lifted by the drug, then could not a depressed mood be elevated also?” Under the brand name Tofranil, imipramine went on to become the first antidepressant—and one of the first blockbuster psychiatric drugs.

American researchers were also interested in antihistamines. In 1957, Leo Sternbach, a chemist for Hoffmann-La Roche who had spent his career researching them, was about to throw away the last of a series of compounds he had been testing that had proven to be pharmacologically inert. But in the interest of completeness, he was convinced to test the last sample. “We thought the expected negative pharmacological results would cap our work on this series of compounds,” one of his colleagues later recounted. But the drug turned out to have muscle-relaxing and sedative properties. Instead of becoming the last in a list of failures, it became the first in a series of spectacular successes—the benzodiazepenes, of which Sternbach’s Librium and Valium were the flagships.

By 1960, the major classes of psychiatric drugs—among them, mood stabilizers, antipsychotics, antidepressants, and anti-anxiety drugs, known as anxiolytics—had been discovered and were on their way to becoming a seventy-billion-dollar market. Having been discovered by accident, however, they lacked one important element: a theory that accounted for why they worked (or, in many cases, did not).

That didn’t stop drug makers and doctors from claiming that they knew. Drawing on another mostly serendipitous discovery of the fifties—that the brain did not conduct its business by sending sparks from neuron to neuron, as scientists previously thought, but rather by sending chemical messengers across synapses—they fashioned an explanation: mental illness was the result of imbalances among these neurotransmitters, which the drugs treated in the same way that insulin treats diabetes.

The appeal of this account is obvious: it combines ancient notions of illness (specifically, the idea that sickness resulted from imbalanced humors) with the modern understanding of the molecular culprits that make us suffer—germs. It held out the hope that mental illness could be treated in the same way as pneumonia or hypertension: with a single pill. Drug companies wasted no time in promulgating it. Merck, the manufacturer of Elavil, commissioned the psychiatrist Frank Ayd to write a book called Recognizing the Depressed Patient, in which he extolled the “chemical revolution in psychiatry” and urged doctors to reassure patients they weren’t losing their minds, but rather suffering a “common illness” with a “physical basis” and a pharmacological cure. Merck sent Ayd’s book to fifty thousand doctors around the country. In 1965, Joseph Schildkraut, a psychiatrist at the National Institute of Mental Health, reverse-engineered antidepressants and offered an actual theory: at least when it came to depression, the imbalances were to be found in the neurotransmitters he thought were affected by the drugs, dopamine and norepinephrine. Seven years after antidepressants were invented, and five years after Ayd asserted that depression was a chemical problem, psychiatrists finally had a precise, scientific explanation for why they worked. The paper quickly became one of the most cited articles in the medical literature.

But Schildkraut was wrong. Within a few years, as technology expanded our ability to peer into the brain, it became clear that antidepressants act mostly by increasing the availability of the neurotransmitter serotonin—rather than dopamine and norepinephrine, as previously thought. A new generation of antidepressants—the selective serotonin reuptake inhibitors (S.S.R.I.s), including Prozac, Zoloft, and Paxil—was developed to target it. The ability to claim that the drugs targeted a specific chemical imbalance was a marketing boon as well, assuring consumers that the drugs had a scientific basis. By the mid-nineties, antidepressants were the best-selling class of prescription medications in the country. Psychiatry appeared to have found magic bullets of its own.