OBJECTIVE: To investigate any association between selective serotonin reuptake inhibitors (SSRIs) taken during pregnancy and congenital major malformations. DESIGN: Population based cohort study. PARTICIPANTS: 493 113 children born in Denmark, 1996-2003. MAIN OUTCOME MEASURE: Major malformations categorised according to Eurocat (European Surveillance of Congenital Anomalies) with additional diagnostic grouping of heart defects. Nationwide registers on medical redemptions (filled prescriptions), delivery, and hospital diagnosis provided information on mothers and newborns. Follow-up data available to December 2005. RESULTS: Redemptions for SSRIs were not associated with major malformations overall but were associated with septal heart defects (odds ratio 1.99, 95% confidence interval 1.13 to 3.53). For individual SSRIs, the odds ratio for septal heart defects was 3.25 (1.21 to 8.75) for sertraline, 2.52 (1.04 to 6.10) for citalopram, and 1.34 (0.33 to 5.41) for fluoxetine. Redemptions for more than one type of SSRI were associated with septal heart defects (4.70, 1.74 to 12.7)). The absolute increase in the prevalence of malformations was low-for example, the prevalence of septal heart defects was 0.5% (2315/493 113) among unexposed children, 0.9% (12/1370) among children whose mothers were prescribed any SSRI, and 2.1% (4/193) among children whose mothers were prescribed more than one type of SSRI. CONCLUSION: There is an increased prevalence of septal heart defects among children whose mothers were prescribed an SSRI in early pregnancy, particularly sertraline and citalopram. The largest association was found for children of women who redeemed prescriptions for more than one type of SSRI.