Background: Community-led total sanitation (CLTS) uses participatory approaches to mobilise communities to build their own toilets and stop open defecation. Our aim was to undertake the first randomised trial of CLTS to assess its effect on child health in Koulikoro, Mali. Methods: We did a cluster-randomised trial to assess a CLTS programme implemented by the Government of Mali. The study population included households in rural villages (clusters) from the Koulikoro district of Mali; every household had to have at least one child aged younger than 10 years. Villages were randomly assigned (1:1) with a computer-generated sequence by a study investigator to receive CLTS or no programme. Health outcomes included diarrhoea (primary outcome), height for age, weight for age, stunting, and underweight. Outcomes were measured 1·5 years after intervention delivery (2 years after enrolment) among children younger than 5 years. Participants were not masked to intervention assignment. The trial is registered with ClinicalTrials.gov, number NCT01900912. Findings: We recruited participants between April 12, and June 23, 2011. We assigned 60 villages (2365 households) to receive the CLTS intervention and 61 villages (2167 households) to the control group. No differences were observed in terms of diarrhoeal prevalence among children in CLTS and control villages (706 [22%] of 3140 CLTS children vs 693 [24%] of 2872 control children; prevalence ratio [PR] 0·93, 95% CI 0·76–1·14). Access to private latrines was almost twice as high in intervention villages (1373 [65%] of 2120 vs 661 [35%] of 1911 households) and reported open defecation was reduced in female (198 [9%] of 2086 vs 608 [33%] of 1869 households) and in male (195 [10%] of 2004 vs 602 [33%] of 1813 households) adults. Children in CLTS villages were taller (0·18 increase in height-for-age Z score, 95% CI 0·03–0·32; 2415 children) and less likely to be stunted (35% vs 41%, PR 0·86, 95% CI 0·74–1·0) than children in control villages. 22% of children were underweight in CLTS compared with 26% in control villages (PR 0·88, 95% CI 0·71–1·08), and the difference in mean weight-for-age Z score was 0·09 (95% CI –0·04 to 0·22) between groups. In CLTS villages, younger children at enrolment (