Diversity–invasibility relationships were explored in the novel context of the colonization resistance provided by gut bacteria of the desert locust Schistocerca gregaria against pathogenic bacteria. Germ-free insects were associated with various combinations of one to three species of locust gut bacteria and then fed an inoculum of the pathogenic bacterium Serratia marcescens. There was a significant negative relationship between the resulting density of Serratia marcescens and the number of symbiotic gut bacterial species present. Likewise there was a significant inverse relationship between community diversity and the proportion of locusts that harboured Serratia. Host mortality was not negatively correlated with resistance to gut-invasion by Serratia marcescens, although there were significantly more deaths among pathogen fed germ-free insects than tri-associated gnotobiotes. The outcome is consistent with the predictions of community ecology theory that species-rich communities are more resistant to invasion than species-poor communities.