When Carolyn Elya, Ph.D., put an organic watermelon out on her balcony, she knew that it would attract fruit flies. But what she didn’t expect is that it would attract strange, almost zombie-like flies infected by a fungus that literally hijacked their brains and bent the flies’ behavior to its fatal will.

Elya, a self-described “zombie fungus biologist” at Harvard University, tells Inverse that these flies infected with a type of fungal pathogen called Entomophthora muscae, a name that, in Greek, translates roughly to “insect destroyer.” The flies are the subject of her new paper, published Tuesday in the journal eLife. While the fungus has been known to control the behavior of insects for many years, it’s not clear how it does so.

To find out how, each day, Elya ventured outside to collect these flies with what she calls a “glorified crazy straw,” noticing that all of the dead flies were frozen in an eerily similar death pose: wings at 90-degree angles, with small bits of an infectious spore-flinging fungus emerging from their backs. When she took these flies back to the University of California Berkeley lab she was working in at the time, she found that this fungus caused these flies to perform a creepy sunset death ritual in the final hours of their lives.

fruit fly zombies
A fly assumes its death pose, manipulated by the puppeteer fungus 

“This happens in the hours leading up to sunset like clockwork,” she says. “The first thing that’s weird is that the flies stop flying. They start to look around for something that’s vertical, and then they start to climb that vertical surface to get up high. Eventually, they stick out their tongue, and their tongue is actually glued down by the fungus.”

At this point, Elya says, the flies start to really freak out. They still appear to have some form of control over their actions, seemingly aware that their behavior is no longer in their own best interest but the results of a fungus hell-bent on imposing it’s will. “It’s really interesting to see the flies’ reactions to the things that they’re doing,” she notes. “The reaction of one particular fly was like, ‘Holy shit, this is not what I expected’.”

In their final hours, the flies appeared to valiantly wage an internal battle until they finally expired, wings erect, as their carcasses rapidly ejected fungal spores from their backs at speeds as high as 21 miles per hour.

flies death ritual
Infected flies sought higher ground before they died, either by climbing the side of the vial or ascending a wooden dowel placed there by researchers

It’s clear that this death ritual, which is similar to that commonly associated with the ant-controlling Cordyceps fungus of Planet Earth fame, is highly adaptive for E. muscae. By shooting upward, an elevated vertical position allows the spores to spread more widely from the carcasses of dead flies. But what remains unclear is exactly how the fungus accomplishes this task. This research shows that, over the course of 96 hours, the fungus moves rapidly throughout the flies’ bodies, consuming fat cells and eventually, post-mortem, their brains. But none of this showed how the fungus manipulates fly behavior.

At first, Elya thought the fungus might simply crowd the neurons it wants to manipulate and change their firing that way. But now, she believes that the fungus actually works from afar by sending molecular messengers intended to produce certain patterns of neuron firing.

“The hypothesis I favor at the moment is that the fungus is secreting some kind of molecule that is changing the way the neurons in the fly function,” she says. “It could operate at a distance. Maybe they’re copycat molecules that mimic what the fly is already using, or maybe they’re something completely different.”

Defining what this molecule is the next step in her research as she completes her post-doc at Harvard. For Elya, this Walking Dead-esque molecule remains a mystery, and many more flies may fall victim to the “insect destroyer” before we know for sure where it comes from and how it works.