Updated project metadata. Obesity is associated with an increased risk of mucosal infections; however, the mechanistic basis of this phenomenon remains incompletely defined. Intestinal mucus barrier systems normally prevent infections, but are sensitive to changes in the luminal environment. Here we demonstrate that mice exposed to an obesogenic Western-style diet (WSD) suffer regiospecific failure of the mucus barrier in the small intestinal jejunum caused by diet-induced mucus condensation, which occurs independently of microbiota alterations. Mucus barrier disruption due to either WSD exposure or chromosomal Muc2 deletion results in collapse of the commensal jejunal microbiota, which in turn sensitises mice to atypical jejunal colonization by the enteric pathogen Citrobacter rodentium. We identify the jejunal mucus layer as a microbial habitat, and link the regiospecific mucus dependency of the microbiota to fundamental properties of the jejunal niche. Together, our data identifies a symbiotic mucus-microbiota relationship that normally prevents jejunal pathogen colonization, but is highly sensitive to disruption by exposure to a Western-style diet.