Aims/hypothesis Lactation for >3 months in women with gestational diabetes is associated with a reduced risk of type 2 diabetes that persists for up to 15 years postpartum. However, the underlying mechanisms are unknown. We examined whether in women with gestational diabetes lactation for >3 months is associated with altered metabolomic signatures postpartum. Methods We enrolled 197 women with gestational diabetes at a median of 3.6 years (interquartile range 0.7-6.5 years) after delivery. Targeted metabolomics profiles (including 156 metabolites) were obtained during a glucose challenge test. Comparisons of metabolite concentrations and ratios between women who lactated for >3 months and women who lactated for ≤3 months or not at all were performed using linear regression with adjustment for age and BMI at the postpartum visit, time since delivery, and maternal education level, and correction for multiple testing. Gaussian graphical modelling was used to generate metabolite networks.Results Lactation for >3 months was associated with a higher total lysophosphatidylcholine/total phosphatidylcholine ratio; in women with short-term follow-up, it was also associated with lower leucine concentrations and a lower total branchedchain amino acid concentration. Gaussian graphical modelling identified subgroups of closely linked metabolites within phosphatidylcholines and branched-chain amino acids that were affected by lactation for >3 months and have been linked to the pathophysiology of type 2 diabetes in previous studies. Conclusions/interpretation Lactation for >3 months in women with gestational diabetes is associated with changes in the metabolomics profile that have been linked to the early pathogenesis of type 2 diabetes.