The invasive pest Drosophila suzukii uses trans-generational medication to resist parasitoid attack.
Animal medication is a behavioral strategy to resist enemies based on the use of substances from the environment. While it has been observed in several animals, whether invasive species can use medication to resist new enemies during its expansion is unknown. Here, we show that the worldwide invasive pest Drosophila suzukii performs trans-generational prophylactic medication by adapting its oviposition behavior in the presence of enemies. We find that flies preferentially lay their eggs on media containing atropine - an entomotoxic alkaloid - in the presence of parasitoids. We further show that flies developing on atropine more efficiently resist parasitization by parasitoids. Finally, we find that developing in hosts reared on atropine strongly impacts the life-history traits of parasitoids. This protective behavior is reported for the first time in a pest and invasive species, and suggests that animal medication may be an important driver of population dynamics during invasions.