Talk about a raw deal: deadly parasitic wasps ruin the lives of adolescent spiders by taking over their minds, forcing them to become hermits and then eating them alive.

A remarkable species of social spider lives in parts of Latin America, in colonies of thousands. Anelosimus eximius spiders dwell in basket-shaped webs up to 25 feet wide attached to vegetation near the jungle floor, where they protect their eggs and raise broods cooperatively. A colony works together to take down much larger prey, such as grasshoppers, which sometimes fall into a web after blundering into silk lines that stick out of it vertically. “It could be someone's nightmare,” says Philippe Fernandez-Fournier, now a doctoral student at Simon Fraser University in British Columbia.

But Fernandez-Fournier recently observed a wasp species—not previously named or described in the scientific literature—that can bend these social spiders to its will in an even more nightmarish way. This parasitic puppet master camps out beside the web, apparently waiting for a young spider to stray from its colony. The wasps may prefer juveniles because of their softer shells and “less feisty” natures, according to Fernandez-Fournier, lead author of a study describing the strange parasitism, published online last November in Ecological Entomology.

Scientists do not know how a wasp larva ends up on the spider—but once there it starts feeding on the arachnid's abdomen. As the larva grows, it starts to control the spider's brain, inducing it to leave the safety of its colony. Then the young spider weaves a ball of silk that seals it off from the outside world. The larva completes its life cycle by eating the rest of the spider, using the conveniently surrounding web to build its own cocoon and pupate into an adult wasp.

Fernandez-Fournier believes the wasp larvae most likely release a chemical that activates specific genes in their hosts, triggering antisocial behavior. Other related spiders are less social, leaving their colonies when they are young. Andrew Forbes, an associate professor of biology at the University of Iowa, who was not involved in Fernandez-Fournier's research, says the mind-controlling wasp larvae may be tapping into this latent genetic pathway. The spiders may have evolved toward social living for protection from predators, but the parasites could be pulling the genetic strings in their favor. “You can think of it,” Forbes says, “as an evolutionary arms race between the spider and the parasitoid.”