The antibiotic trimethoprim acts as a folate antagonist. Since trophoblasts are very sensitive to drugs that interfere with the folic acid cycle and thereby inhibit DNA synthesis, use of trimethoprim during the first trimester could be associated with miscarriage. A nationwide cohort study including all women in Denmark with a registered pregnancy between 1997 and 2005 was conducted. We used nationwide registers to identify all women giving birth, having a record of miscarriage or induced abortion. Data on exposure to trimethoprim were obtained from the National Prescription Register. Cox proportional hazard regression analysis with exposure to trimethoprim as a time-dependent variable was used to estimate the risk of miscarriage. The adjusted hazard ratio of having a miscarriage after exposure to trimethoprim in the first trimester compared to non-exposure was 2∙04 (95% confidence interval 1∙43-2∙91). Our results indicate that trimethoprim exposure in the first trimester is associated with a doubling of the hazard of miscarriage.