Some wasps are called 'parasitoids' because they lay their eggs in still-living caterpillars. The eggs develop into larvae that eat the caterpillar from the inside.

But turnabout is fair play. Sometimes, other wasps called 'hyperparasitoids' lay their eggs in the larvae of these parasitoids!

The caterpillars also fight back. Their immune system detects the wasp's eggs, and they will do things like surround the eggs in a layer of tissue that chokes them.

But many parasitoid wasps have a trick to stop this. They deploy viruses that infect the caterpillar and affect its behavior in various ways - for example, slowing its immune response to the implanted eggs.

These viruses can become so deeply symbiotic with the wasps that their genetic code becomes part of the wasp's DNA. So every wasp comes *born* with the ability to produce these viruses. They're called 'polydnaviruses'.

In fact some wasps are symbiotic with *two kinds* of virus. One kind, on its own, would quickly kill the caterpillar - not good for the wasp. The other kind keeps the first kind under control.

And I'm immensely simplifying things here. There are over 25,000 species of parasitoid wasps, so there's a huge variety of things that happen, which scientists are just starting to understand! I had fun reading this:

• Marcel Dicke, Antonino Cusumano and Erik H. Poelman, Microbial symbionts of parasitoids, Annual Review of Entomology, https://doi.org/10.1146/annurev-ento-011019-024939

Why such diversity? I think it's just that there are so many plants! So insect larvae like caterpillars naturally tend to feed on them... in turn providing a big food source for parasitoids, and so on.

@johncarlosbaez that DOI link failed to resolve, thanks for a more complete citation! https://doi.org/10.1146/annurev-ento-011019-024939
Microbial Symbionts of Parasitoids | Annual Reviews

Parasitoids depend on other insects for the development of their offspring. Their eggs are laid in or on a host insect that is consumed during juvenile development. Parasitoids harbor a diversity of microbial symbionts including viruses, bacteria, and fungi. In contrast to symbionts of herbivorous and hematophagous insects, parasitoid symbionts do not provide nutrients. Instead, they are involved in parasitoid reproduction, suppression of host immune responses, and manipulation of the behavior of herbivorous hosts. Moreover, recent research has shown that parasitoid symbionts such as polydnaviruses may also influence plant-mediated interactions among members of plant-associated communities at different trophic levels, such as herbivores, parasitoids, and hyperparasitoids. This implies that these symbionts have a much more extended phenotype than previously thought. This review focuses on the effects of parasitoid symbionts on direct and indirect species interactions and the consequences for community ecology.

@gretyl - thanks for catching that problem! I've fixed the link so it works now. Lots of people are liking and boosting this post but you seem to be the first one who liked it enough to read more. 😏