False color micrograph of Enterococcus faecalis, which is usually innocuous.CDC / Pete Wardell

For three decades, the deadly bacteria sat in cold storage. Normally, Enterococcus faecalis lives harmlessly in the human gut. One particular strain, however, caused a series of strangely persistent infections at the University of Wisconsin Hospital and Clinics in the 1980s. The E. faecalis found its way into patients’ blood and grew resistant to antibiotics. Patients started to die.

The outbreak ran its course, but its origins remained a mystery. How do bacteria that live without causing distress in the gut—that probably are living in your gut right now—turn lethal? Fortunately, Mark Huycke, then a doctor at the University of Wisconsin, thought to save E. faecalis samples from the 1980s outbreak.

“It’s great that sometimes microbiologists don’t throw things away,” says Daria Van Tyne, an infectious-disease researcher now at the University of Pittsburgh and the lead author of a new paper on the 1980s outbreak. Three decades later, Van Tyne’s colleagues were able to sequence 62 frozen samples from the outbreak. Antibiotic-resistant E. faecalis still causes trouble in hospitals here and there. This study is one of the most detailed reconstructions yet of how E. faecalis can mutate inside patients’ bodies, going from innocuous gut dweller to deadly blood infection.

First, Van Tyne established that the E. faecalis outbreak strain really was exceptional. It had acquired powers that the E. faecalis of your gut may not have: toxin production, resistance to several antibiotics, resistance to the specific disinfectant used in hospitals, and tolerance of acidic pHs. This tolerance, Van Tyne thinks, is part of how E. faecalis spreads from patient to patient—the fecal-oral route. Patients would accidentally ingest the bacteria after touching contaminated surfaces; the bacteria then had to pass through the acidic stomach before reaching its favored environment, in the intestines.

This simple observation actually has profound implications for how E. faecalis continues to evolve, over and over again in each person it manages to infect. In people who are very sick, bacteria can leak from the gut into the bloodstream. But since gut bacteria are adapted to live in the gut, that relocation poses a challenge to E. faecalis. To cause a full-blown blood infection, they had to change, in order to thrive in human blood.

Van Tyne analyzed the novel mutations in the 62 samples, and she noticed they clustered in specific genes: cydABDC, where mutations help bacteria evade the human immune system; pbp4, where mutations confer resistance to antibiotics; and gntR, another spot that helped the bacteria escape immune cells, but that also made them resistant to antibiotics.

These changes had a surprising feature: Not every patient’s E. faecalis had the same mutations. In fact, the bacteria had different mutations, but in many of the same places. What this means is that gut-optimized E. faecalis is independently evolving to infect the blood of each patient. But it’s converging on the same strategy each time, tinkering with the same set of genes but making slightly different alterations.

“It’s evolution in action in the body,” says George Weinstock, a microbial genomicist at Jackson Labs. By sequencing all these different strains, scientists are able to watch evolution play out over and over again in the bloodstream of each patient.

Other bacteria that evolve from benign to troublesome may go through the same process. Van Tyne is now wrapping up a study with doctors at the University of Pittsburgh Medical Center about Klebsiella pneumoniae, which lives harmlessly on skin and in the gut but can sometimes cause lung infections. And while patient records from the 1980s E. faecalis outbreak have unfortunately been lost to history, she is able to compare genomes from different Klebsiella pneumoniae samples to see which ones made patients ill and which ones were fatal.

From the perspective of gut bacteria, evolving into a deadly blood invader is not a great long-term proposition. It’s pretty nice to hang out in the gut for decades over a human life span. But evolving to be so deadly as to kill your host means you have to go find a new one—or die. “It’s shortsighted, because it doesn’t think of after tomorrow,” says Sylvain Brisse, a population biologist at the Institut Pasteur.

Ultimately, blood-infecting E. faecalis lineages may be evolutionary culs-de-sac. They die out when the patient is cured or when the patient dies. But these particular E. faecalis samples happened to be saved in a freezer. That’s the beauty of this paper, says Brisse. It captures a brief evolutionary blip that is of little consequence to E. faecalis as a species, but of huge consequence to the human unlucky enough to have encountered a deadly line of bacteria.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.