The mucosal immune system is exposed to pathogens but also to food and commensal bacteria, and must produce active immune responses or tolerance, respectively. The ability to discriminate accurately between the two is important, since making the wrong decision can result in allergy or in susceptibility to infectious diseases. There is increasing evidence that events during early life can influence individual susceptibility to allergy, by affecting the process of colonisation of the intestine with commensal microbiota, exposure to pathogenic organisms, or through the level of exposure to food antigens before weaning. Similar early-life events affecting microbial colonisation are also now thought to contribute to a number of metabolic diseases in humans. Our studies use piglets, since they develop transient immune responses to food antigens at weaning, and since they are commercially reared in a range of different environments including extensive, outdoor systems and intensive, indoor systems. In addition, their nutrition and metabolism is perceived as very comparable to that of humans.