1. Insects lack the acquired immune system of vertebrates, but there is some evidence that insect immunity can be primed against an encountered pathogen to mitigate the intensity of future infections within a life stage.
2. Many invertebrates have multiple life-history stages separated by complete metamorphosis, but different life stages can often be infected by the same pathogens, and the potential loss of immune priming during metamorphosis could therefore have detrimental effects on the host. Evidence that invertebrate immune priming can persist through metamorphosis is still missing, and consequently it is unclear how host–parasite interactions change across different life-history stages in the context of infection history.
3. By experimentally manipulating the infection history of the flour beetle Tribolium confusum, we show that intestinal gregarine parasite infections during the larval stage reduced parasite load in adults, demonstrating that a host-controlled mechanism for parasite resistance can persist through complete metamorphosis in insects.
4. Infections reduced larval developmental rates and increased host mortality but only during the crucial metamorphic stage, indicating that parasites impact multiple life stages. In general, our results demonstrate that invertebrates can show surprisingly robust immune priming despite dramatic physiological changes and protect hosts across completely different life-history stages.