Avian eggshells harbour microbes shortly after laying, and under appropriate ambient conditions they can multiply rapidly, penetrate through shell pores, infect egg contents and cause embryo mortality. We experimentally examined how incubation affects bacterial processes on the eggshells of pearl-eyed thrashers Margarops fuscatus nesting in tropical montane and lowland forests in Puerto Rico. Bacteria and fungi grew rapidly on shells of newly laid, unincubated eggs exposed to ambient conditions, but declined to low levels on shells of eggs incubated by thrashers. Divergence in bacterial growth between incubated and exposed eggs was more marked at the montane forest than at the lowland site. Pathogenic microorganisms became increasingly dominant on shells of exposed eggs, but these groups were relatively rare on incubated eggs, where more benign, less invasive groups prevailed. Some incubation during laying may be necessary to decrease the probability of trans-shell infection by reducing the growth of harmful bacteria and fungi on eggshells, although it may increase hatching asynchrony and the likelihood of brood reduction.