Wasps already have a bad rap, especially among those allergic to their stings, but a new study has made the demonized insect seem even grimmer.

Authors of a study published in The Journal of Experimental Biology detailed how a certain species of wasps are able to take control of spiders, forcing them to perform a specific task. The wasp species, Reclinervellus nielseni, would lay an egg on the spider's abdomen and the larva that eventually hatched would somehow take control of the victim's mind, The Guardian reported.

The spiders under this spell would then weave webs optimized to foster wasp larvae. Keizo Takasuka, of Kobe University in Japan, led the study geared toward understanding how a parasite truly alters its prey's state of mind.

When not controlled by wasp larvae, The Guardian reported, the spiders were observed forming two kinds of webs: one for trapping dinner and one for resting.

"Analyzing the cocoon webs, Takasuka was struck by their similarity to the resting webs, complete with fluffy decorative structures," read a press release describing the study. "And when Takasuka analyzed the spiders' behavior as they constructed the cocoon webs over a 10 h period, he saw that the manipulated spiders always constructed the new web on the site of the old orb web, painstakingly removing the sticky spiral first, then reinforcing the radial and frame threads and then adding the fibrous web decorations.

"And, when the web was complete and the wasp larva done with its spider slave, the larva directed the spider to return to the hub of the web before murdering it."