Diabetes mellitus is one of the most common and important medical complications affecting pregnancy and resolves once the pregnancy has ended. However, about 3 per cent of women with a diagnosis of gestational diabetes mellitus (GDM) actually have type 2 diabetes diagnosed for the first time in pregnancy and therefore it persists after the pregnancy is over. The coexistence of diabetes of any type and pregnancy is associated with an increased risk of adverse outcomes for both the woman and the baby. Women with pre-existing diabetes should be counselled before pregnancy about the implications of pregnancy, and given particular support to optimise blood glucose control and the management of related medical complications when trying to conceive. Women with either pre-existing diabetes or GDM require multidisciplinary care during the pregnancy. All women with GDM should be offered annual screening for diabetes to identify the development of type 2 diabetes after pregnancy.