If you think being stung by a wasp is nasty, count your lucky stars they don’t hold zombifying powers over you. Some parasitoid wasps are capable of hijacking the nervous system of their poor unsuspecting victims, turning them into slave nurseries for the developing offspring. In the case of the emerald jewel wasp, this nursery happens to be the living host’s innards – delightful.

Now, scientists have detailed another fascinating example of this phenomenon, in which a wasp overlord turns an ill-fated spider victim into a personal construction worker for the insect. Instead of pursuing normal day-to-day activities, the “drugged navy” spends its final hours on Earth weaving a protective cocoon web for the wasp, allowing its pupa to develop in a safe environment after the hapless spider comes to its unfortunate demise.

The targets for this particular parasitoid wasp (Reclinervellus nielseni) are two species of orb-weaver spiders, one found in Europe and the other in Japan, although this particular study focused on the latter, named Cyclosa argenteoalba. These spiders build webs for different purposes throughout their lives: normal “orb” webs with a characteristic sticky spiral that serves as a prey-capture device, and specialized resting webs that provide protection while they undergo molting.

Although scientists previously observed that the cocoon web constructed by parasitized hosts bears resemblance to the latter, the web manipulation mechanism remained hazy. More specifically, it was unclear as to whether the wasp induced resting web construction, or if the cocoon and resting webs simply share similarities in structure.

To find out more, researchers from Kobe University in Japan gathered wild spider specimens complete with their parasite masters and brought them back to the lab for further investigation. The process of host manipulation, lead author Keizo Takasuka tells IFLScience, involves an initial sting from an adult wasp that temporarily paralyzes the spider, although this does not contribute to the process of web manipulation.

After the wasp lays an egg, he adds, the larva develops and hatches outside the spider, sucking the host’s circulatory fluid externally. The zombified spider then seems to time the cocoon web-building process perfectly with the development of the larva, occurring just as it is ready to pupate. Examination of these webs and their construction in the lab not only reiterated their striking resemblance to resting webs, but also revealed that they were always built over the old orb web.

As described in The Journal of Experimental Biology, the spider laboriously removed the sticky, prey-capture parts and laid down more threads to reinforce the web. Consequently, the cocoon webs were significantly stronger than resting webs. However, the threads themselves did not appear to differ between cocoon and resting webs, indicating that silk production was not altered. Interestingly, the spiders also added UV-reflecting decorative structures, which the researchers believe could serve to help avoid damage from potential web-destroyers, such as birds.

The researchers also found that the cocoon web-building process ensued even when the larva was removed from the spider. According to Takasuka, this suggests that, during later stages of parasitism, the externally attached larva injects a substance into the spider that ultimately triggers cocoon web building when it is time for the larva to pupate. What this inducer is remains unclear, although they speculate that it could be some kind of chemical that mimics spider-molting hormones.