Bacterial ectosymbionts in cuticular organs chemically protect a beetle during molting stages.
In invertebrates, the cuticle is the first and major protective barrier against predators and pathogen infections. While immune responses and behavioral defenses are also known to be important for insect protection, the potential of cuticle-associated microbial symbionts to aid in preventing pathogen entry during molting and throughout larval development remains unexplored. Here, we show that bacterial symbionts of the beetle Lagria villosa inhabit unusual dorsal invaginations of the insect cuticle, which remain open to the outer surface and persist throughout larval development. This specialized location enables the release of several symbiont cells and the associated protective compounds during molting. This facilitates ectosymbiont maintenance and extended defense during larval development against antagonistic fungi. One Burkholderia strain, which produces the antifungal compound lagriamide, dominates the community across all life stages, and removal of the community significantly impairs the survival probability of young larvae when exposed to different pathogenic fungi. We localize both the dominant bacterial strain and lagriamide on the surface of eggs, larvae, pupae, and on the inner surface of the molted cuticle (exuvia), supporting extended protection. These results highlight adaptations for effective defense of immature insects by cuticle-associated ectosymbionts, a potentially key advantage for a ground-dwelling insect when confronting pathogenic microbes.