Host-associated microbiota can be affected by factors related to environmental change, such as urbanization and invasive species. For example, urban areas often affect food availability for animals, which can change their gut microbiota. Invasive parasites can also influence microbiota through competition or indirectly through a change in the host immune response. These interacting factors can have complex effects on host fitness, but few studies have disentangled the relationship between urbanization and parasitism on an organism's gut microbiota. To address this gap in knowledge, we investigated the effects of urbanization and parasitism by the invasive avian vampire fly (Philornis downsi) on the gut microbiota of nestling small ground finches (Geospiza fuliginosa) on San Cristóbal Island, Galápagos. We conducted a factorial study in which we experimentally manipulated parasite presence in an urban and nonurban area. Faeces were then collected from nestlings to characterize the gut microbiota (i.e. bacterial diversity and community composition). Although we did not find an interactive effect of urbanization and parasitism on the microbiota, we did find main effects of each variable. We found that urban nestlings had lower bacterial diversity and different relative abundances of taxa compared to nonurban nestlings, which could be mediated by introduction of the microbiota of the food items or changes in host physiology. Additionally, parasitized nestlings had lower bacterial richness than nonparasitized nestlings, which could be mediated by a change in the immune system. Overall, this study advances our understanding of the complex effects of anthropogenic stressors on the gut microbiota of birds.