The mammalian gastrointestinal tract harbors a complex ecosystem consisting of countless bacteria in homeostasis with the host immune system. Shaped by evolution, this partnership has potential for symbiotic benefit. However, the identities of bacterial molecules mediating symbiosis remain undefined. Here we show that, during colonization of animals with the ubiquitous gut microorganism Bacteroides fragilis, a bacterial polysaccharide (PSA) directs the cellular and physical maturation of the developing immune system. Comparison with germ-free animals reveals that the immunomodulatory activities of PSA during B. fragilis colonization include correcting systemic T cell deficiencies and T(H)1/T(H)2 imbalances and directing lymphoid organogenesis. A PSA mutant of B. fragilis does not restore these immunologic functions. PSA presented by intestinal dendritic cells activates CD4+ T cells and elicits appropriate cytokine production. These findings provide a molecular basis for host-bacterial symbiosis and reveal the archetypal molecule of commensal bacteria that mediates development of the host immune system.