To find the world’s most sinister examples of mind control, don’t look to science fiction. Instead, go to a tropical country like Brazil, and venture deep into the jungle. Find a leaf that’s hanging almost exactly 25 centimeters above the forest floor, no more and no less. Now look underneath it. If you’re in luck, you might find an ant clinging to the leaf’s central vein, jaws clamped tight for dear life. But this ant’s life is already over. And its body belongs to Ophiocordyceps unilateralis, the zombie-ant fungus.

When the fungus infects a carpenter ant, it grows through the insect’s body, draining it of nutrients and hijacking its mind. Over the course of a week, it compels the ant to leave the safety of its nest and ascend a nearby plant stem. It stops the ant at a height of 25 centimeters—a zone with precisely the right temperature and humidity for the fungus to grow. It forces the ant to permanently lock its mandibles around a leaf. Eventually, it sends a long stalk through the ant’s head, growing into a bulbous capsule full of spores. And because the ant typically climbs a leaf that overhangs its colony’s foraging trails, the fungal spores rain down onto its sisters below, zombifying them in turn.

The fungus’s skill at colonizing ants is surpassed only by its skill at colonizing popular culture. It’s the organism behind the monsters of the video game “The Last of Us” and the zombies of the book The Girl With All the Gifts. It’s also an obsession of one David Hughes, an entomologist at Pennsylvania State University, who has been studying it for years. He wants to know exactly how this puppet master controls its puppets—and his latest experiments suggest that it’s even more ghoulish than it first appears.

Hughes’s student Maridel Fredericksen used a special microscope to julienne infected ants into slices that were just 50 nanometers thick—a thousandth of the width of a human hair. She scanned each slice, compiled the images into a three-dimensional model, and painstakingly annotated which bits were ant and which bits were fungus. It took three months to mark up just one muscle. To speed things up, Hughes teamed up with computer scientist Danny Chen, who trained an artificial intelligence to distinguish ant from fungus.

When the fungus first enters its host, it exists as single cells that float around the ant’s bloodstream, budding off new copies of themselves. But at some point, as Fredericksen’s images show, these single cells start working together. They connect to each other by building short tubes, of a kind that have only ever been seen before in fungi that infects plants. Hooked up in this way, they can communicate and exchange nutrients.

They can also start invading the ant’s muscles, either by penetrating the muscle cells themselves or growing into the spaces between them. The result is what you can see in this video: a red muscle fiber, encircled and drained by a network of interconnected yellow fungal cells. This is something unique to Ophiocordyceps. Hughes’s team found that another parasitic fungus, which fatally infects ants but doesn’t manipulate their minds, also spreads into muscles but doesn’t form tubes between individual cells, and doesn’t wire itself into large networks.

Whenever Hughes or anyone else discusses the zombie-ant fungus, they always talk about it as a single entity, which corrupts and subverts a host. But you could also think of the fungus as a colony, much like the ants it targets. Individual microscopic cells begin life alone but eventually come to cooperate, fusing into a superorganism. Together, these brainless cells can commandeer the brain of a much larger creature.

But surprisingly, they can do that without ever physically touching the brain itself. Hughes’s team found that fungal cells infiltrate the ant’s entire body, including its head, but they leave its brain untouched. There are other parasites that manipulate their hosts without destroying their brains, says Kelly Weinersmith from Rice University. For example, one flatworm forms a carpet-like layer over the brain of the California killifish, leaving the brain intact while forcing the fish to behave erratically and draw the attention of birds—the flatworm’s next host. “But manipulation of ants by Ophiocordyceps is so exquisitely precise that it is perhaps surprising that the fungus doesn't invade the brain of its host,” Weinersmith says.

In retrospect, that makes sense. “If such parasites were merely invading and destroying neuronal tissue, I don’t think the manipulated behaviors that we observe would be as compelling as they are,” says Charissa de Bekker from the University of Central Florida. “Something much more intricate must be going on.” She notes that the fungus secretes a wide range of chemicals that could influence the brain from afar.

So what we have here is a hostile takeover of a uniquely malevolent kind. Enemy forces invading a host’s body and using that body like a walkie-talkie to communicate with each other and influence the brain from afar. Hughes thinks the fungus might also exert more direct control over the ant’s muscles, literally controlling them “as a puppeteer controls as a marionette doll.” Once an infection is underway, he says, the neurons in the ant’s body—the ones that give its brain control over its muscles—start to die. Hughes suspects that the fungus takes over. It effectively cuts the ant’s limbs off from its brain and inserts itself in place, releasing chemicals that force the muscles there to contract. If this is right, then the ant ends its life as a prisoner in its own body. Its brain is still in the driver’s seat, but the fungus has the wheel.