The human gut is colonized with a wide variety of microorganisms, including species, such as those belonging to the bacterial genus Bifidobacterium, that have beneficial effects on human physiology and pathology. Among the most distinctive benefits of bifidobacteria are modulation of host defence responses and protection against infectious diseases. Nevertheless, the molecular mechanisms underlying these effects have barely been elucidated. To investigate these mechanisms, we used mice associated with certain bifidobacterial strains and a simplified model of lethal infection with enterohaemorrhagic Escherichia coli O157:H7, together with an integrated 'omics' approach. Here we show that genes encoding an ATP-binding-cassette-type carbohydrate transporter present in certain bifidobacteria contribute to protecting mice against death induced by E. coli O157:H7. We found that this effect can be attributed, at least in part, to increased production of acetate and that translocation of the E. coli O157:H7 Shiga toxin from the gut lumen to the blood was inhibited. We propose that acetate produced by protective bifidobacteria improves intestinal defence mediated by epithelial cells and thereby protects the host against lethal infection.