The mechanism to maintain homeostasis of the gut microbiota remains largely unknown despite its critical role in the body defense. In the intestines of mice with deficiency of activation-induced cytidine deaminase (AID), the absence of hypermutated IgA is partially compensated for by the presence of large amounts of unmutated IgM and normal expression levels of defensins and angiogenins. We show here a predominant and persistent expansion of segmented filamentous bacteria throughout the small intestine of AID(-/-) mice. Reconstitution of lamina propria IgA production in AID(-/-) mice recovered the normal composition of gut flora and abolished the local and systemic activation of the immune system. The results indicate that secretions of IgAs rather than innate defense peptides are critical to regulation of commensal bacterial flora and that the segmented filamentous bacteria antigens are strong stimuli of the mucosal immune system.