Background The addition of azithromycin to standard regimens for antibiotic prophylaxis before cesarean delivery may further reduce the rate of postoperative infection. We evaluated the benefits and safety of azithromycin-based extended-spectrum prophylaxis in women undergoing nonelective cesarean section. METHODS In this trial conducted at 14 centers in the United States, we studied 2013 women who had a singleton pregnancy with a gestation of 24 weeks or more and who were undergoing cesarean delivery during labor or after membrane rupture. We randomly assigned 1019 to receive 500 mg of intravenous azithromycin and 994 to receive placebo. All the women were also scheduled to receive standard antibiotic prophylaxis. The primary outcome was a composite of endometritis, wound infection, or other infection occurring within 6 weeks. RESULTS The primary outcome occurred in 62 women (6.1%) who received azithromycin and in 119 (12.0%) who received placebo (relative risk, 0.51; 95% confidence interval [CI], 0.38 to 0.68; P<0.001). There were significant differences between the azithromycin group and the placebo group in rates of endometritis (3.8% vs. 6.1%, P=0.02), wound infection (2.4% vs. 6.6%, P<0.001), and serious maternal adverse events (1.5% vs. 2.9%, P=0.03). There was no significant between-group difference in a secondary neonatal composite outcome that included neonatal death and serious neonatal complications (14.3% vs. 13.6%, P=0.63). CONCLUSIONS Among women undergoing nonelective cesarean delivery who were all receiving standard antibiotic prophylaxis, extended-spectrum prophylaxis with adjunctive azithromycin was more effective than placebo in reducing the risk of postoperative infection.