IgA antibodies have an important role in clearing mucosal pathogens. In this study, we have examined the contribution of IgA to the immune control of the gastrointestinal bacterial pathogens Helicobacter pylori and Citrobacter rodentium. Both bacteria trigger a strong local IgA response that results in bacterial IgA coating in mice and in gastritis patients. Class switching to IgA depends on Peyer's patches, T-cells, eosinophils, and eosinophil-derived TGF-β in both models. In the case of H. pylori, IgA secretion and bacterial coating also depend on a functional bacterial type IV secretion system, which drives the generation of Th17 cells and the IL-17-dependent expression of the polymeric immunoglobulin receptor PIGR. IgA