Many enteropathogenic bacteria target the mammalian gut. The mechanisms protecting the host from infection are poorly understood. We have studied the protective functions of secretory antibodies (sIgA) and the microbiota, using a mouse model for S. typhimurium diarrhea. This pathogen is a common cause of diarrhea in humans world-wide. S. typhimurium (S. tm(att), sseD) causes a self-limiting gut infection in streptomycin-treated mice. After 40 days, all animals had overcome the disease, developed a sIgA response, and most had cleared the pathogen from the gut lumen. sIgA limited pathogen access to the mucosal surface and protected from gut inflammation in challenge infections. This protection was O-antigen specific, as demonstrated with pathogens lacking the S. typhimurium O-antigen (wbaP, S. enteritidis) and sIgA-deficient mice (TCRβ(-/-)δ(-/-), J(H) (-/-), IgA(-/-), pIgR(-/-)). Surprisingly, sIgA-deficiency did not affect the kinetics of pathogen clearance from the gut lumen. Instead, this was mediated by the microbiota. This was confirmed using 'L-mice' which harbor a low complexity gut flora, lack colonization resistance and develop a normal sIgA response, but fail to clear S. tm(att) from the gut lumen. In these mice, pathogen clearance was achieved by transferring a normal complex microbiota. Thus, besides colonization resistance ( = pathogen blockage by an intact microbiota), the microbiota mediates a second, novel protective function, i.e. pathogen clearance. Here, the normal microbiota re-grows from a state of depletion and disturbed composition and gradually clears even very high pathogen loads from the gut lumen, a site inaccessible to most "classical" immune effector mechanisms. In conclusion, sIgA and microbiota serve complementary protective functions. The microbiota confers colonization resistance and mediates pathogen clearance in primary infections, while sIgA protects from disease if the host re-encounters the same pathogen. This has implications for curing S. typhimurium diarrhea and for preventing transmission.