Human zombies may be a fiction relegated to horror flicks and Halloween festivities, but the rest of the animal kingdom is rife with an array of zombie-like behaviors.

A microbe causes mice to lose their fear of cats, making them more likely to be eaten; a protozoan decreases the amount of blood tsetse flies can get from a single bite, causing them to bite several individuals; and a flatworm makes snails sprout colorful horns, attracting the attention of birds that eat them as part of the worm’s reproductive cycle.

Perhaps no victims are more terrifying than ant zombies, whose bodies serve as food for a fungus before they’re compelled to climb vegetation and latch onto a leaf while a long fungal tentacle erupts from their heads, releasing a cloud of spores onto the unfortunate ants below.

In each of these cases, a parasite alters the behavior or appearance of its host so that it can be transferred to a different individual or species, where it completes its life cycle. Scientists still aren’t entirely sure how such small parasites are able to force animals much larger than themselves to do their bidding.

But research published Wednesday in the Journal of Experimental Biology helps paint a vivid picture of exactly what happens once a fungus called Ophiocordyceps — found in the southeastern United States, including Florida, South Carolina and Missouri — invades its carpenter ant host. Once a spore lands on a foraging ant, it begins to grow and bores through the ant’s exoskeleton.

For the next two to three weeks, the fungus grows long, slender threads, called hyphae, through the ant’s body, feeding off soft tissues but leaving vital organs intact. The hyphae spread into the ant’s head as well, but surprisingly don’t penetrate the brain.

The ant carries on its normal behavior during this time until something changes, and it’s compelled to climb up a leaf or a twig and bite down to anchor itself.

But if the fungus isn’t manipulating the brain, how does the ant know to climb there in the first place?

Colleen Mangold, a postdoctoral researcher at Pennsylvania State University and lead author on the study, said that part is still a mystery.

“We don’t know what specifically causes that change in behavior. That’s an area of ongoing investigation,” she said. “From what we can tell, there is no fungus in the brain. That was surprising, but at the same time, it’s beneficial to keep the ant alive as long as possible.”

What the researchers did find was a large concentration of fungal cells inside the ants’ jaws, suggesting that the fungus is able to hijack the ant’s mouth and force it to close.

It may do this by growing directly into the muscles that control the jaw, or by secreting fungal toxins, causing them to clamp on the leaf with such force that tissues within the muscles are severely damaged in the process.

“We were all pretty surprised when this research group discovered that the fungus was manipulating the muscles rather than the nervous system, more like a puppeteer than a hypnotist,” said Alex Wild, curator of entomology at the University of Texas. “It’s good to get this more detailed picture of the mechanism.”

But other mysteries arose during the course of the study. Researchers found several small vesicles in infected areas of the ant, which they theorize could possibly contain fungal toxins or even be part of the ant’s defense mechanism.

“It’s a complex, precise phenomenon that’s occurring,” Mangold said, “and we’re just beginning to scratch the surface in terms of understanding the underlying mechanisms.”