ObjectiveTo establish the most effective and best tolerated dose of caffeine citrate for the prevention of intermittent hypoxaemia (IH) in late preterm infants.DesignPhase IIB, double-blind, five-arm, parallel, randomised controlled trial.SettingNeonatal units and postnatal wards of two tertiary maternity hospitals in New Zealand.ParticipantsLate preterm infants born at 34+0–36+6 weeks’ gestation, recruited within 72 hours of birth.InterventionInfants were randomly assigned to receive a loading dose (10, 20, 30 or 40 mg/kg) followed by 5, 10, 15 or 20 mg/kg/day equivolume enteral caffeine citrate or placebo daily until term corrected age.Primary outcomeIH (events/hour with oxygen saturation concentration ≥10% below baseline for ≤2 min), 2 weeks postrandomisation.Results132 infants with mean (SD) birth weight 2561 (481) g and gestational age 35.7 (0.8) weeks were randomised (24–28 per group). Caffeine reduced the rate of IH at 2 weeks postrandomisation (geometric mean (GM): 4.6, 4.6, 2.0, 3.8 and 1.7 events/hour for placebo, 5, 10, 15 and 20 mg/kg/day, respectively), with differences statistically significant for 10 mg/kg/day (GM ratio (95% CI] 0.39 (0.20 to 0.76]; p=0.006) and 20 mg/kg/day (GM ratio (95% CI] 0.33 (0.17 to 0.68]; p=0.003) compared with placebo. The 20 mg/kg/day dose increased mean (SD) pulse oximetry oxygen saturation (SpO2) (97.2 (1.0) vs placebo 96.0 (0.8); p<0.001), and reduced median (IQR) percentage of time SpO2 <90% (0.5 (0.2–0.8) vs 1.1 (0.6–2.4); p<0.001) at 2 weeks, without significant adverse effects on growth velocity or sleeping.ConclusionCaffeine reduces IH in late preterm infants at 2 weeks of age, with 20 mg/kg/day being the most effective dose.Trial registration numberACTRN12618001745235.