The gut microbiota confers host protection against pathogen colonization early after infection. Several mechanisms underlying the protection have been described, but the contributions of nutrient competition versus direct inhibition are controversial. Using an ex vivo model of Salmonella growth in the mouse cecum with its indigenous microbes, we find that nutrient limitation and typical inhibitory factors alone cannot prevent pathogen growth. However, the addition of certain amino acids markedly reverses the microbiota's ability to suppress pathogen growth. Enhanced Salmonella colonization after antibiotic treatment is ablated by exclusion of dietary protein, which requires the presence of the microbiota. Thus, dietary protein and amino acids are important regulators of colonization resistance.