Once the fungus invades its victim’s body, it’s already too late. The invader spreads through the host in a matter of days. The victim, unaware of what is happening, becomes driven to climb to a high spot. Just before dying, the infected body—a zombie—grasps a perch as the mature fungal invader erupts from the back of the zombie’s head to rain down spores on unsuspecting victims below, starting the cycle again. This isn’t the latest gross-out moment from a George A. Romero horror film; it is part of a very real evolutionary arms race between a parasitic fungus and its victims, ants.

One zombie by itself is not necessarily very scary, but in B movies from, Night of the Living Dead to Zombieland, Hollywood’s animated corpses have a nasty habit of creating more of the walking dead. Controlled by some inexplicable force, perhaps an intensely virulent pathogen, the main preoccupation of a zombie is making other zombies. The story line is pure drive-in movie schlock, yet the popular mythology of zombies has lately been spattered with a coating of biological truth. There actually are organisms that have evolved to control the minds and bodies of other creatures, turning once normal individuals into dazed victims that fulfill the parasite’s need to reproduce itself.

Some of the most successful zombie-masters are fungi from the genus Ophiocordyceps. The parasites infest many kinds of arthropods—from butterflies to cockroaches—but it is among ants that the fungi’s ability to control other beings’ behavior is most apparent. One prototypical scenario is found in Costa Rica, where infected bullet ants (Paraponera clavata) climb to a great spore-sprinkling height before the fungus erupts.

In the jungles of Thailand, the fungus Ophiocordyceps unilaterius parasitizes Camponotus leonardi ants, which forage on the ground and nest in the canopy. When infected, these ants shamble toward “ant graveyards,” where they bite down on the undersides of leaves, anchoring their fungus-infested husks at a level of the forest with just the right humidity and temperature to allow the fungus to grow properly. When Sandra Andersen of the University of Copenhagen and colleagues placed the bodies of infected ants higher in the canopy, the parasites grew abnormally, and infested ants placed on the ground were eaten by other insects. “The fungus is sensitive to UV light, and the heavy rainfall in a tropical forest would most likely also be able to damage the fungus,” Andersen says. “The position of the ant on the underside of the leaf limits the exposure of the parasite.” The fungus drives the ants to seek out specific places to die that best benefit the growth of the fungus.

Ophiocordyceps-like parasites have been manipulating other organisms for millions of years—their disturbing behavior has been preserved in the fossil record. Forty-eight million years ago, during the global hothouse epoch of the Eocene, the place now known as Messel, Germany, was draped in a lush, semitropical forest. Archaic primates scrambled among the trees; cousins of early horses browsed; and an Ophiocordyceps-like fungus caused ants to put a death grip on leaves just before the infesting fungus fully overran their bodies. Exceptionally preserved fossil leaves from the Messel quarry show the same pattern of leaf scars made by some living ant species when they have become fungus-controlled zombies.

Scientists are looking for these types of interactions even farther back in time. “Now that we know the behavior like this can fossilize, I would not be surprised if we find more,” says University of Exeter behavioral ecologist David Hughes. “I believe samples tens of millions of years older are likely.” The fungus is clearly ancient: in 2008, another team announced that a 105-million-year-old insect trapped in amber was shot through with an Ophiocordyceps-like fungus. It is possible that zombie-style parasitism between the fungus and its hosts goes back to the Cretaceous days of the dinosaurs (though evidence of zombie dinosaurs has not been forthcoming).

Fungi aren’t the only parasites to hijack ants. A different kind of parasite changes the appearance of giant gliding ants (Cephalotes atratus) from Central and South America. While studying this ant species in Panama, Stephen Yanoviak of the University of Arkansas and colleagues noticed that the gasters of many ants–the bulbous back end of the abdomen–were bright red, and the ants held them up high in a behavior called “gaster flagging.” When the scientists dissected the ants, they found hundreds of tiny, transparent eggs of a previously unknown species of nematode worm.

The nematode infestation thinned the exoskeleton of the ant’s gaster, which, combined with the presence of nematode eggs, caused it to look red and to detach easily from the rest of the ant’s body. The gasters of these infested ants are easy pickings for local birds that usually eat red berries. After the nematode eggs pass through the bird’s digestive system, they are deposited back onto the forest floor in bird droppings. Gliding ants regularly eat bird droppings, and when worker ants bring avian feces back to the nest, they inadvertently feed nematode eggs to ant larvae. As the ants develop, the nematodes grow and reproduce inside the ant’s body, leaving eggs in the gaster. The ants totter around until a bird picks them off, continuing the cycle.

Some parasites cause even more dramatic anatomical changes in their victims. The flatworm Leucochloridium paradoxum is the scourge of North American and European snails unfortunate enough to eat the droppings of birds containing the eggs of the parasite. Once inside the snail’s body, the worms infest the eye stalks, turning the tentacles into brightly colored, pulsating organs that attract birds. Once the bird eats this part of the infested snail, the parasites reproduce inside the bird and leave their eggs in its digestive system. Simple as they are, parasites have evolved to be masters of manipulation.

Scientists are just beginning to study how two species come to occupy the same body and vie for its control. It’s not yet clear what chemicals signals alter the behavior and appearance of parasitized ants and other victims. Somehow fungi and other parasites are manipulating brain chemicals, and one doesn’t have to be a mad scientist to want to understand more. Zombies have a long natural history, stretching back tens of millions of years, and nature is filled with creeping, oozing, blood sucking and otherwise ghastly creatures just as terrifying as anything Hollywood could concoct. Just don’t expect scientists to discover much about sparkling vampires or radioactive dinosaurs with a taste for Japanese cities.

Brian Switek is the author of Written in Stone: Evolution, the Fossil Record, and Our Place in Nature.