Childhood diarrhoea is associated with infection of the gut by pathogens such as Vibrio cholerae and enterotoxigenic Escherichia coli (ETEC), but how the gut microbiota recovers post infection is incompletely understood. David et al. analysed the microbiome of rectal samples from 13 patients with cholera and 18 patients with ETEC at early, mid and late stages during recovery. Recovery to a normal microbiome occurred only at the late stage, 30 days after infection, but distinct groups of bacteria were reproducibly present at the early and mid stages. Taxonomic and functional data supported a succession model in which infection-induced diarrhoea depletes the gut microbiota, resulting in elevated oxygen and carbohydrate levels in the gut; facultative anaerobes that reach the gut by food ingestion or by migration then colonize the gut; aerobic respiration by these bacteria lowers the oxygen levels in the gut; as oxygen levels fall, obligate anaerobes recolonize the gut and alter the carbohydrate composition to favour 'healthy' commensals and promote recovery.