Findings 8922 children and 6537 young infants were included in the modified intention-to-treat analyses. Children were followed up for a median of 48 months (IQR 39–50) and young infants for 38 months (34–41) after dose 1. From month 0 until study end, compared with 9585 episodes of clinical malaria that met the primary case definition in children in the C3C group, 6616 episodes occurred in the R3R group (VE 36·3%, 95% CI 31·8–40·5) and 7396 occurred in the R3C group (28·3%, 23·3–32·9); compared with 171 children who experienced at least one episode of severe malaria in the C3C group, 116 children experienced at least one episode of severe malaria in the R3R group (32·2%, 13·7 to 46·9) and 169 in the R3C group (1·1%, –23·0 to 20·5). In young infants, compared with 6170 episodes of clinical malaria that met the primary case definition in the C3C group, 4993 episodes occurred in the R3R group (VE 25·9%, 95% CI 19·9–31·5) and 5444 occurred in the R3C group (18·3%, 11·7–24·4); and compared with 116 infants who experienced at least one episode of severe malaria in the C3C group, 96 infants experienced at least one episode of severe malaria in the R3R group (17·3%, 95% CI –9·4 to 37·5) and 104 in the R3C group (10·3%, –17·9 to 31·8). In children, 1774 cases of clinical malaria were averted per 1000 children (95% CI 1387–2186) in the R3R group and 1363 per 1000 children (995–1797) in the R3C group. The numbers of cases averted per 1000 young infants were 983 (95% CI 592–1337) in the R3R group and 558 (158–926) in the R3C group. The frequency of SAEs overall was balanced between groups. However, meningitis was reported as a SAE in 22 children: 11 in the R3R group, ten in the R3C group, and one in the C3C group. The incidence of generalised convulsive seizures within 7 days of RTS,S/AS01 booster was 2·2 per 1000 doses in young infants and 2·5 per 1000 doses in children. Interpretation RTS,S/AS01 prevented a substantial number of cases of clinical malaria over a 3–4 year period in young infants and children when administered with or without a booster dose. Efficacy was enhanced by the administration of a booster dose in both age categories. Thus, the vaccine has the potential to make a substantial contribution to malaria control when used in combination with other effective control measures, especially in areas of high transmission.