The mucosal immune system fulfils the primary function of defence against potential pathogens that may enter across vulnerable surface epithelia. However, a secondary function of the intestinal immune system is to discriminate between pathogen-associated and ‘harmless’ antigens, expressing active responses against the former and tolerance to the latter. Control of immune responses appears to be an active process, involving local generation of IgA and of regulatory and/or regulated T lymphocytes. Two important periods of maximum exposure to novel antigens occur in the young animal, immediately after birth and at weaning. In both cases the antigenic composition of the intestinal contents can shift suddenly, as a result of a novel diet and of colonisation by novel strains and species of bacteria. Changes in lifestyles of man, and husbandry of animals, have resulted in weaning becoming much more abrupt than previously in evolution, increasing the number of antigens that must be simultaneously evaluated by neonates. Thus, birth and weaning are likely to represent hazard and critical control points in the development of appropriate responses to pathogens and harmless dietary and commensal antigens. Neonates are born with relatively undeveloped mucosal immune systems. At birth this factor may prevent both expression of active immune responses and development of tolerance. However, colonisation by intestinal flora expands the mucosal immune system in antigen-specific and non-specific ways. At weaning antibody to fed proteins can be detected, indicating active immune responses to fed proteins. It is proposed that under normal conditions the ability of the mucosal immune system to mount active responses to foreign antigens develops simultaneously with the ability to control and regulate such responses. Problems arise when one or other arm of the immune system develops inappropriately, resulting in inappropriate effector responses to harmless food proteins (allergy) or inadequate responses to pathogens (disease susceptibility).