A geometrid moth caterpillar guards the pupae of the Glyptapanteles wasp. Image: Wikimedia Commons

Like something out of a horror movie, parasitic Glyptapanteles wasp larvae survive by consuming their hosts from the inside out, then manipulating them into serving as bodyguards.

The process is grisly: first, the female wasp begins by injecting approximately 80 eggs into an unlucky caterpillar victim. The eggs develop inside the creature, going through several molts and discarding their exoskeletons inside the caterpillar’s ever-expanding body. The larvae feed off the insides of their host as they grow, devouring only the organs not required for immediate survival.

Once they are mature and ready to make their exit, the larvae release chemicals that paralyze the caterpillar, allowing them to slice through its skin using tiny, jagged jaws. Somehow, the caterpillar stays alive and intact as the larvae emerge all at once. Scientists hypothesize that they block up any exit holes with their final exoskeleton molt.

All but two of the larvae will emerge — it’s thought that these individuals stay behind to manipulate the host.

After the freeloading larvae are out, they enter the pupae stage and begin building their cocoons. At this point, the caterpillar unknowingly steps in as a bodyguard, spinning what should be his own cocoon on top of the pupae for their protection. In a twist of irony, the pupae are at risk of being impregnated by other parasitic wasps during this stage.

When the brood is sufficiently secure, the caterpillar is seemingly mind-controlled to dutifully stand guard over them, battling would-be predators and forgoing all meals. Eventually, the caterpillar starves to death and the wasps emerge from their cocoons unharmed.

Ecologist Arne Janssen of the University Amsterdam has studied this unusual and horrific life cycle extensively. He and his colleagues were the first to reveal this bizarre ritual, which they say drastically improves the chances of larvae survival.

“Most parasitoids eat the host completely empty. The Glyptapanteles don’t do that,” he told Wired reporter Matt Simon. We don’t know exactly why, but one of the reasons may be that if you kill the host it cannot defend you afterwards.”

Looks like you can eat your caterpillar and have it too. Watch the process play out in excruciating detail below: