AIMS: The aim of this study was to quantify the risk of major congenital anomaly, and to assess the influence of peri-conception HbA(1c) and other clinical and socio-demographic factors on the risk of congenital anomaly occurrence in offspring of women with type 1 and type 2 diabetes diagnosed before pregnancy. METHODS: This was a population-based cohort study using linked data from registers of congenital anomaly and diabetes in pregnancy. A total of 401,149 singleton pregnancies (1,677 in women with diabetes) between 1996 and 2008 resulting in live birth, fetal death at ≥20 weeks' gestation or termination of pregnancy for fetal anomaly were included. RESULTS: The rate of non-chromosomal major congenital anomaly in women with diabetes was 71.6 per 1,000 pregnancies (95% CI 59.6, 84.9), a relative risk of 3.8 (95% CI 3.2, 4.5) compared with women without diabetes. There was a three- to sixfold increased risk across all common anomaly groups. In a multivariate analysis, peri-conception glycaemic control (adjusted OR [aOR] 1.3 [95% CI 1.2, 1.4] per 1% [11 mmol/mol] linear increase in HbA(1c) above 6.3% [45 mmol/mol]) and pre-existing nephropathy (aOR 2.5 [95% CI 1.1, 5.3]) were significant independent predictors of congenital anomaly. Associations with gestation at booking (aOR 1.1 [95% CI 1.0, 1.1]) and parity (aOR 1.6 [95% CI 1.0, 2. 5]) were not significant. Unadjusted risk was higher for women from deprived areas or who did not take folate. Type and duration of diabetes, ethnicity, age, BMI, preconception care, smoking and fetal sex were not associated with congenital anomaly risk. CONCLUSIONS: Peri-conception glycaemia is the most important modifiable risk factor for congenital anomaly in women with diabetes. The association with nephropathy merits further study.