Objective To test whether azithromycin eradicates Ureaplasma from the respiratory tract in preterm infants. Design Prospective, phase IIb randomised, double-blind, placebo-controlled trial. Setting Seven level III-IV US, academic, neonatal intensive care units (NICUs). Patients Infants 24 0 -28 6 weeks' gestation (stratified 24 0 -26 6; 27 0 -28 6 weeks) randomly assigned within 4 days following birth from July 2013 to August 2016. Interventions Intravenous azithromycin 20 mg/kg or an equal volume of D5W (placebo) every 24 hours for 3 days. Main outcome measures The primary efficacy outcome was Ureaplasma-free survival. Secondary outcomes were all-cause mortality, Ureaplasma clearance, physiological bronchopulmonary dysplasia (BPD) at 36 weeks' postmenstrual age, comorbidities of prematurity and duration of respiratory support. Results One hundred and twenty-one randomised participants (azithromycin: n=60; placebo: n=61) were included in the intent-to-treat analysis (mean gestational age 26.2±1.4 weeks). Forty-four of 121 participants (36%) were Ureaplasma positive (azithromycin: n=19; placebo: n=25). Ureaplasma-free survival was 55/60 (92% (95% CI 82% to 97%)) for azithromycin compared with 37/61 (61% (95% CI 48% to 73%)) for placebo. Mortality was similar comparing the two treatment groups (5/60 (8%) vs 6/61 (10%)). Azithromycin effectively eradicated Ureaplasma in all azithromycin-assigned colonised infants, but 21/25 (84%) Ureaplasma-colonised participants receiving placebo were culture positive at one or more follow-up timepoints. Most of the neonatal mortality and morbidity was concentrated in 21 infants with lower respiratory tract Ureaplasma colonisation. In a subgroup analysis, physiological BPD-free survival was 5/10 (50%) (95% CI 19% to 81%) among azithromycin-assigned infants with lower respiratory tract Ureaplasma colonisation versus 2/11 (18%) (95% CI 2% to 52%) in placebo-treated infants. Conclusion A 3-day azithromycin regimen effectively eradicated respiratory tract Ureaplasma colonisation in this study. Trial registration number NCT01778634.