Years ago the environmental historian Alfred Crosby was at Washington State University, where he was teaching at the time, when on a whim he decided to pick up an old almanac from 1917. (This is apparently the kind of thing historians like to do in their spare time.) He looked up the U.S. life expectancy in that year—it was about 51 years. He turned to the 1919 almanac, and found about the same figure. Then Crosby picked up the almanac from 1918. The U.S. life expectancy in 1918 had fallen to 39 years. “What the hell happened?” Crosby told the New York Times writer Gina Kolata in her book Flu: The Story of the Great Influenza Pandemic of 1918. “ The life expectancy had dropped to what it had been fifty years before.”

What happened was the 1918 influenza pandemic. A virus that usually does little more than make people feel awful for a few days killed an estimated 50 million people worldwide, if not far more, with 650,000 people dying in the U.S. alone. The flu killed more people in a year than the bubonic plague killed in a century in the Middle Ages. Worst of all, this flu disproportionately took the lives of men and women in their 20s and 30s, while often sparing the very old and the very young—two population groups that are especially vulnerable to the flu in most years.

This has confounded scientists for almost a century, but a new study in the Proceedings of the National Academy of Sciences (PNAS) puts forward a fresh answer to one of the enduring mysteries of medical science. Researchers led by Michael Worobey of the University of Arizona reconstructed the origins of the 1918 pandemic, concluding that the pathogen arose when an existing human H1 flu virus acquired genetic material from a bird flu virus. That new H1N1 flu virus was able to evade immune systems, which helps explain why it infected more than a quarter of the U.S. population at the time. But it was young adults between the ages of 20 and 40 that died in the greatest number—and Worobey’s study suggests that the unusual death pattern was due as much to flus of the past as it was to the flu of 1918. “Prior immunity, or lack of it, seems to be the decisive factor,” says Worobey.

Flu viruses are constantly changing and mutating, which is why we can’t develop a lifelong vaccine for it the way we can for more stable viruses, like the ones that cause smallpox or the measles. A flu virus has two parts: hemagglutinin and neuraminidase proteins, shortened to HA and NA (and just H and N when naming a virus). It’s the HA protein that seems to drive our immune system response, as Worobey put it in a statement:

Imagine a soccer ball studded with lollipops. The candy part of the lollipop is the globular part of the HA protein, and that is by far the most potent part of the flu virus against which our immune system can make antibodies. If antibodies cover all the lollipop heads, the virus can’t even infect you.

Worobey and his colleagues looked back at the kinds of flu viruses that were in circulation in the decades preceding the 1918 pandemic by examining antibodies found in old blood samples. (Your immune system will produce customized antibodies in response to a flu infection, and those antibodies will remain in your body, which allows scientists to identify the genetic makeup of the virus that led to their creation.) It turns out people born between 1880 and 1900—the generation hit hardest by the 1918 flu—were mostly exposed during childhood to a H3N8 flu virus that began circulating during an earlier pandemic in 1889, but not to an H1 virus, which meant that generation had virtually no antibodies to fight it off.

By reconstructing the genetic origins of the 1918 flu, Worobey found that a version of that H1N1 flu virus was circulating for years before the pandemic began. Because flu strikes most commonly in childhood, those born after 1900 were more likely to have had previous exposure to an H1N1-like flu virus, which would have offered them some protection. Meanwhile those born before 1880 were more likely to have been exposed to the H1N8 flu strain that was prevalent when they were children. In both the very young and the old, having earlier exposure to an H1 flu—even one different from the strain that caused the 1918 pandemic—offered a level of protection not present in those who had never been infected by an H1 strain. That could explain the unusual mortality curve in the 1918 pandemic.

The researchers found a remarkable overlap between death rates in various age groups in 1918 and childhood exposure to an H3 flu virus that was mismatched with H1N1 pandemic virus. Credit: Michael Worobey

Thankfully, no flu pandemic since 1918 has been anywhere near as deadly. The 2009 swine flu pandemic killed an estimated 284,000 people worldwide, comparable to flu deaths in a non-pandemic year. But two avian flu viruses — H5N1 and H7N9 — have for years been periodically jumping the species barrier and infecting human beings. And like the 1918 flu, H5N1 and H7N9 are unusually deadly, particularly for the young and elderly, respectively. “Lots of different age groups might be exposed to these viruses, but the virus that kills them is the one that’s mismatched to the virus they encountered as a child,” says Worobey.

The PNAS paper suggests that this might be due to past flu patterns as well, with both groups having been exposed to flu viruses in their youth that offered them little protection against the new pathogens. If either virus were to mutate to the point where it could spread easily in the human population, the results could be catastrophic.

But the PNAS paper offers hope that doctors could begin to design flu vaccination strategies that compensate for the strains that different age groups never experienced as children. Down the line, scientists may even be able to develop a universal flu vaccine that targets parts of the virus that almost never change from strain to strain. “This work is encouraging that possibility,” says Worobey. If we’re smart, the global catastrophe that was the 1918 pandemic will remain confined to the history books.

Contact us at letters@time.com.