The mucosal surfaces of the gut and airways have important barrier functions and regulate the induction of immunological tolerance. The rapidly increasing incidence of chronic inflammatory disorders of these surfaces, such as inflammatory bowel disease and asthma, indicates that the immune functions of these mucosae are becoming disrupted in humans. Recent data indicate that events in prenatal and neonatal life orchestrate mucosal homeostasis. Several environmental factors promote the perinatal programming of the immune system, including colonization of the gut and airways by commensal microorganisms. These complex microbial-host interactions operate in a delicate temporal and spatial manner and have an important role in the induction of homeostatic mechanisms.