Relatives of this zombie-ant fungus have been domesticated by cicadas. Katja Schulz / Flickr

In the summer of 2015, at a scientific conference in New Hampshire, I was chatting with a biologist named John McCutcheon when an excited young Japanese researcher came up and introduced himself. His name was Yu Matsuura, and like McCutcheon, he had been studying the microbes that live inside cicadas—stout bugs that are known for their loud songs. He had found something that was about to blow McCutcheon’s mind.

Cicadas feed on plant sap—a diet that’s high in sugar, but low in other essential nutrients. The cicadas cope with the help of domesticated bacteria, which live inside their cells. These so-called endosymbionts act like living dietary supplements, providing their insect hosts with the nutrients that are missing from their meals. Most cicadas have two such bacteria: Sulcia and Hodgkinia. But in most of the Japanese species that Matsuura studied, Hodgkinia was missing. He couldn’t find any traces of its DNA.

Hodgkinia isn’t optional. It makes essential vitamins and other nutrients that Sulcia cannot. If it really was absent, some other microbe must have been supplementing the cicadas in its place. “But no matter what I tried, I couldn’t find any other bacteria—only Sulcia,” says Matsuura, who works at the University of the Ryukyus. “I was confused. I thought maybe I had done something wrong.”

All became clear when he used a microscope to examine the organs in which cicadas house their microbes. Within these round structures, Matsuura saw the cells of a foreign fungus. At first, he thought that the cicadas had picked up a fungal infection, but he found the same cells in every species that lacked Hodgkinia. These insects had clearly adopted some kind of fungus and turned it into an endosymbiont that replaced the missing bacterium.

And when Matsuura sequenced the new symbiont’s DNA, he realized that it was perhaps the last fungus that anyone would have expected. As McCutcheon later said to me, “It was a motherfucking cordyceps.”

Cordyceps fungi excel at infecting and killing insects. One particular species, Ophiocordyceps unilateralis, has become famous for its ability to turn ants into zombies. It grows through an ant’s body, creating a network of filaments that commandeers the insect’s muscles. Then it compels the ant to climb a plant stem, and clamp its jaws on the underside of a leaf. Once the ant is in position, the fungus sends a long stalk through its head, culminating in a ball full of spores that rain downward and hit the ant’s colony-mates as they go about their foraging trips. In this way, the zombie fungus can claim an entire colony. It excels at infiltrating popular culture, too: It’s the organism behind the monsters of The Last of Us and the zombies of The Girl With All the Gifts.

The fungi that Matsuura discovered in the cicadas are all close relatives of this ant-killing species—all part of the same Ophiocordyceps genus. And that, to put it bluntly, is extraordinary. Even when these fungi aren’t acting as sinister puppet-masters, they’re still acting as killer parasites. Their hosts almost always end up dead, with spore-tipped stalks erupting from their corpses.

And yet Matsuura showed that cicadas have domesticated Ophiocordyceps, turning it into an essential part of their own bodies. It’s like discovering that Darth Vader is the Jedi’s new mascot, or that the Joker has replaced Alfred as Batman’s butler.

Many beneficial microbes evolve from parasitic ancestors, and the divide between these two lifestyles is more of a continuum. “So often, we want to use black-and-white definitions to define these associations between hosts and microbes,” says Nichole Broderick from the University of Connecticut. “This study is a great reminder of the greyness of biology.”

It’s also a reminder that fungi are important. “It might be worthwhile to look at them as part of an organism’s microbiome instead of merely focusing on bacteria as is done in the majority of studies,” adds Charissa de Bekker from the University of Central Florida.

Cicadas certainly encounter a lot of fungi. They spend most of their lives underground, and are constantly surrounded by fungi that live in soil. These include several species of Ophiocordyceps that specialize in parasitizing cicadas and nothing else. Matsuura suspects that some of these fungi mutated into weaker strains, which established mild and chronic infections in the cicadas’ blood without killing them outright. These strains came to coexist with their hosts. Perhaps their presence conferred some kind of benefit, like resistance to viral infections. And perhaps they might even have saved some of the cicadas from extinction.

Remember Hodgkinia, the bacterial symbiont that cicadas rely on? As partners go, it’s “really going off the rails,” says McCutcheon. He has shown that this single microbe tends to split into what are effectively several daughter species. A single cicada might have dozens of these daughter microbes. Each of these contains just a few of its ancestor’s genes. None of them can survive on their own, but they’re collectively essential to the insect’s survival.

This chaotic mess leaves the cicada in a precarious position. If Hodgkinia keeps on fracturing into ever-smaller pieces, some of those pieces might stop working properly, or disappear entirely. In that case, the bacterium would no longer be able to furnish the cicada with the nutrients it needs. The cicada would go extinct, unless it can tap into another source of those nutrients—a source, perhaps, like the benign Ophiocordyceps fungi circulating through its body. These fungi can make all the amino acids and vitamins that the cicadas need. When Hodgkinia finally let the insects down, Ophiocordyceps—that unlikeliest of partners—could have stepped up.

The Japanese cicadas have recruited Ophiocordyceps on at least three separate occasions. And other scientists, including Matsuura’s supervisor Takema Fukatsu, have found several other cases in which sap-sucking insects formed partnerships with these infamous parasites.

“The big picture is a tapestry of diverse microbial symbionts arriving and departing,” says Nancy Moran from the University of Texas at Austin. “And there should probably be a thicket of ghost-like threads in the background, of all the hosts that went extinct due to dependence on decrepit partners.”