Background: Chlamydia trachomatis is one of the most commonly diagnosed sexually transmitted infections worldwide, but reports in the medical literature of an association between genital chlamydia infection and adverse obstetric outcomes are inconsistent. Methods: The Western Australia Data Linkage Branch created a cohort of women of reproductive age by linking records of birth registrations with the electoral roll for women in Western Australia who were born from 1974 to 1995. The cohort was then linked to both chlamydia testing records and the state perinatal registry for data on preterm births and other adverse obstetric outcomes. We determined associations between chlamydia testing, test positivity, and adverse obstetric outcomes using multivariate logistic regression analyses. Findings: From 2001 to 2012, 101 558 women aged 15 to 38 years had a singleton birth. Of these women, 3921 (3·9%) had a spontaneous preterm birth, 9762 (9·6% of 101 371 women with available data) had a baby who was small for gestational age, and 682 (0·7%) had a stillbirth. During their pregnancy, 21 267 (20·9%) of these women had at least one chlamydia test record, and 1365 (6·4%) of those tested were positive. Before pregnancy, 19 157 (18·9%) of these women were tested for chlamydia, of whom 1595 (8·3%) tested positive for chlamydia. Among all women with a test record, after adjusting for age, ethnicity, maternal smoking, and history of other infections, we found no significant association between a positive test for chlamydia and spontaneous preterm birth (adjusted odds ratio 1·08 [95% CI 0·91–1·28]; p=0·37), a baby who was small for gestational age (0·95 [0·85–1·07]; p=0·39), or stillbirth (0·93 [0·61–1·42]; p=0·74). Interpretation: A genital chlamydia infection that is diagnosed and, presumably, treated either during or before pregnancy does not substantially increase a woman's risk of having a spontaneous preterm birth, having a baby who is small for gestational age, or having a stillbirth. Funding: Australian National Health and Medical Research Council.