Competition among bacteria for carbohydrates is pivotal for colonization resistance (CR). However, the impact of Western-style diets on CR remains unclear. Here we show how the competition between Klebsiella oxytoca and Klebsiella pneumoniae is modulated by consuming one of three Western-style diets characterized by high-starch, high-sucrose, or high-fat/high-sucrose content. In vivo competition experiments in ampicillin-treated mice reveal that K. oxytoca promotes K. pneumoniae decolonization on all dietary backgrounds. However, mice on the high-fat/high-sucrose diet show reduced pathogen clearance. Microbiome analysis reveals that the combination of Western-style diets and ampicillin treatment synergize in microbiome impairment, particularly noticeable in the presence of high dietary fat content. The diet-independent degradation of ampicillin in the gut lumen by K. oxytoca beta-lactamases facilitates rapid commensal outgrowth, which is required for subsequent pathogen clearance. Our findings provide insights into how diet modulates functional microbiome recovery and K. oxytoca-mediated pathogen elimination from the gut.
© 2025. The Author(s).