Continuous ambulatory peritoneal dialysis (CAPD) has come to be extensively used for the treatment of end-stage renal failure in children, and especially infants, such that now more than half of children on dialysis worldwide receive treatment by this means. Peritonitis, however, is commoner in children than in adults receiving treatment, and is a major source of morbidity and treatment failure in children started on CAPD. Only recently has the immunology of the normal peritoneum been studied extensively, with the need to assess the impact of the installation of large volumes of fluid into the peritoneal sac during dialysis. The main phagocytic defences of the peritoneum depend upon a unique set of macrophages which are present free in the peritoneal fluid but also in the submesothelium and in perivascular collections together with B lymphocytes in the submesothelial area. Both the number of macrophages per unit volume and the concentration of opsonic proteins, such as IgG, complement and fibronectin, are reduced to between only 1% and 5% when dialysis fluid is continuously present in the peritoneal sac. In addition, the fluids used for CAPD are toxic to both macrophages and to mesothelial cells. Thus minor degrees of contamination frequently lead to peritonitis and in addition the majority of patients have catheters inserted in their peritoneum which become colonised with organisms capable of producing exopolysaccharide (slime), which promotes adhesion of the organism to the plastic and protects them against phagocytic attack and the penetration of antibiotics. Thus the peritoneum is in a state of continual inflammation, as well as being a markedly more vulnerable site than the normal peritoneum to the entry of organisms. Whether clinical peritonitis appears in this state of chronic contamination probably depends on perturbation in the balance between host defences and the organism. Whilst Staphylococcus epidermidis is the commonest cause of peritonitis, Staphylococcus aureus and Gram-negative organisms are much more serious and more frequently lead either to temporary catheter removal or discontinuation of dialysis altogether. This review describes the peritoneal defences in relation to the genesis of peritonitis.