The emergence of the adaptive immune system in vertebrates set the stage for evolution of an advanced symbiotic relationship with the intestinal microbiota. The defining features of specificity and memory that characterize adaptive immunity have afforded vertebrates the mechanisms for efficiently tailoring immune responses to diverse types of microbes, whether to promote mutualism or host defence. These same attributes can put the host at risk of immune-mediated diseases that are increasingly linked to the intestinal microbiota. Understanding how the adaptive immune system copes with the remarkable number and diversity of microbes that colonize the digestive tract, and how the system integrates with more primitive innate immune mechanisms to maintain immune homeostasis, holds considerable promise for new approaches to modulate immune networks to treat and prevent disease. © 2012 Macmillan Publishers Limited. All rights reserved.