Background: This randomized clinical trial analysed the effect of perioperative selective decontamination of the digestive tract (SDD) in elective gastrointestinal surgery on postoperative infectious complications and leakage. Methods: All patients undergoing elective gastrointestinal surgery during a 5-year period were evaluated for inclusion. Randomized patients received either SDD (polymyxin B sulphate, tobramycin and amphotericin) or placebo in addition to standard antibiotic prophylaxis. The primary endpoint was postoperative infectious complications and anastomotic leakage during the hospital stay or 30 days after surgery. Results: A total of 289 patients were randomized to either SDD (143) or placebo (146). Most patients (190, 65·7 per cent) underwent colonic surgery. There were 28 patients (19·6 per cent) with infectious complications in the SDD group compared with 45 (30·8 per cent) in the placebo group (P = 0·028). The incidence of anastomotic leakage in the SDD group was 6·3 per cent versus 15·1 per cent in the placebo group (P = 0·016). Hospital stay and mortality did not differ between groups. Conclusion: Perioperative SDD in elective gastrointestinal surgery combined with standard intravenous antibiotics reduced the rate of postoperative infectious complications and anastomotic leakage compared with standard intravenous antibiotics alone. Perioperative SD.D should be considered for patients undergoing gastrointestinal surgery. Registration number: P02.1187L (Dutch Central Committee on Research Involving Human Subjects).