Bacteria colonize the intestine shortly after birth and thereafter exert several beneficial functions, including induction of protective immunoglobulin A (IgA) antibodies. The distal intestine contains IgA(2), which is more resistant to bacterial proteases than is IgA(1). The mechanism by which B cells switch from IgM to IgA(2) remains unknown. We found that human intestinal epithelial cells (IECs) triggered IgA(2) class switching in B cells, including IgA(1)-expressing B cells arriving from mucosal follicles, through a CD4(+) T cell-independent pathway involving a proliferation-inducing ligand (APRIL). IECs released APRIL after sensing bacteria through Toll-like receptors (TLRs) and further increased APRIL production by activating dendritic cells via thymic stromal lymphopoietin. Our data indicate that bacteria elicit IgA(2) class switching by linking lamina propria B cells with IECs through a TLR-inducible signaling program requiring APRIL. Thus, mucosal vaccines should activate IECs to induce more effective IgA(2) responses.