Phylogenetic analysis of gut communities of vertebrates is advanced, but the relationships, especially at the trophic level, between commensals that share gut habitats of monogastric animals have not been investigated to any extent. Lactobacillus reuteri strain 100-23 and Lactobacillus johnsonii strain 100-33 cohabit in the forestomach of mice. According to the niche exclusion principle, this should not be possible because both strains can utilise the two main fermentable carbohydrates present in the stomach digesta: glucose and maltose. We show, based on gene transcription analysis, in vitro physiological assays, and in vivo experiments that the two strains can co-exist in the forestomach habitat because 100-23 grows more rapidly using maltose, whereas 100-33 preferentially utilises glucose. Mutation of the maltose phosphorylase gene (malA) of strain 100-23 prevented its growth on maltose-containing culture medium, and resulted in the numerical dominance of 100-33 in the forestomach. The fundamental niche of L. reuteri 100-23 in the mouse forestomach can be defined in terms of 'glucose and maltose trophism'. However, its realised niche when L. johnsonii 100-33 is present is 'maltose trophism'. Hence, nutritional adaptations provide niche differentiation that assists cohabitation by the two strains through resource partitioning in the mouse forestomach. This real life, trophic phenomenon conforms to a mathematical model based on in vitro bacterial doubling times, in vitro transport rates, and concentrations of maltose and glucose in mouse stomach digesta.