Juvenile roaches were not nearly as masterful at the kick, however. They fell prey to the zombie wasp attacks much more often than adults, according to the study.

When the wasp venom takes effect, the cockroach is sedated and led by its antenna into a hole, where the wasp deposits an egg and then seals the exit with debris. Technically, after an attack cockroaches might walk, run, or fly if properly stimulated—by a scientist, say—but they don’t in the wild, and researchers don’t know why. It’s “as if they are slowly eaten alive by the developing wasp larva,” the paper posits. Ending up in that hole is a death sentence for the roach.

No previous research detailed how cockroaches escape this grim fate. “Here it is shown that many cockroaches deter wasps with a vigorous defense. Successful cockroaches elevated their bodies, bringing their neck out of reach, and kicked at the wasp with their spiny hind legs, often striking the wasp’s head multiple times,” according to Catania’s study. The paper concludes, “Thus, for a cockroach not to become a zombie, the best strategy is: be vigilant, protect your throat, and strike repeatedly at the head of the attacker.”

📬 Sign up for the Daily Brief

Our free, fast, and fun briefing on the global economy, delivered every weekday morning.