Objectives. To compare the risk of postpartum infections within 30 days after vaginal birth, emergency, or elective cesarean section (CS). Design. Register-based cohort study in Denmark. Participants. A total of 32,468 women giving birth in hospitals in the County of Aarhus, Denmark, during the period 2001–2005. Methods. Data from various hospital registries were combined and infections were identified by positive cultures, prescriptions for antibiotics and, re-operative procedures. Risk of postpartum infection was estimated and adjustment for potentially confounders was performed. Results. Within 30 days postpartum, 7.6% of women who had underwent CS and 1.6% of women having a vaginal birth acquired an infection, yielding an adjusted odds ratio (OR) of 4.71, 95% confidence interval (CI): 4.08–5.43. The prevalence of postpartum urinary tract infection (UTI) was 2.8%, after CS and 1.5% after vaginal birth corresponding to an adjusted OR = 1.68, 95% CI: 1.38–2.03. The risk of UTI did not differ between emergency and elective CS. The prevalence of WI was 5.0% after CS and 0.08% after vaginal birth. Moreover, we found a nearly 50% higher risk of postpartum WI after emergency CS compared to elective CS (OR = 1.49, 95% CI: 1.13–1.97). More than 75% (697/907) of postpartum infections appeared after hospital discharge. Conclusions. The risk of postpartum infection seems to be nearly five-fold increased after CS compared with vaginal birth. This may be of concern since the prevalence of CS is increasing.