Objective To test whether steroids reduce respiratory distress in babies born by elective caesarean section at term. Design Multicentre pragmatic randomised trial. Setting 10 maternity units. Participants 998 consenting women randomised at decision to deliver by elective caesarean section; 503 randomised to treatment group. Interventions The treatment group received two intramuscular doses of 12 mg betamethasone in the 48 hours before delivery. The control group received treatment as usual. Outcome measures The primary outcome was admission to special care baby unit with respiratory distress. Secondary outcomes were severity of respiratory distress and level of care in response. Results Sex, birth weight, and gestation were not different between the two groups. Of the 35 babies admitted to special baby units with respiratory distress, 24 were in the control group and 11 in the intervention group (P = 0.02). The incidence of admission with respiratory distress was 0.051 in the control group and 0.024 in the treatment group (relative risk 0.46, 95% confidence interval 0.23 to 0.93). The incidence of transient tachypnoea of the newborn was 0.040 in the control group and 0.021 in the treatment group (0.54, 0.26 to 1.12). The incidence of respiratory distress syndrome was 0.011 in the control group and 0.002 in the treatment group (0.21, 0.03 to 1.32). Conclusions Antenatal betamethasone and delaying delivery until 39 weeks both reduce admissions to special care baby units with respiratory distress after elective caesarean section at term.