Vitamin A deficiency has been associated with impaired fetal pancreatic development and increased risk of developing type 2 diabetes mellitus (T2DM). In 1962, mandatory margarine fortification with vitamin A was increased by 25 % in Denmark. We aimed to determine whether offspring of mothers who had been exposed to the extra vitamin A from fortification during pregnancy had a lower risk of developing T2DM in adult life, compared with offspring of mothers exposed to less vitamin A. Individuals from birth cohorts with the higher prenatal vitamin A exposure (born 1 December 1962-31 March 1964) and those with lower prenatal exposure (born 1 September 1959-31 December 1960) were followed up with regard to development of T2DM before 31 December 2012 in the Danish National Diabetes Registry and National Patient Register. Logistic and Cox regression analyses were performed to determine the risk of T2DM by vitamin A exposure level. A total of 193 803 individuals were followed up until midlife. Our results showed that individuals exposed prenatally to extra vitamin A from fortified margarine had a lower risk of developing T2DM than those exposed to lower levels: OR 0·88; 95 % CI 0·81, 0·95, P=0·001, after adjustment for sex. Fetal exposure to small, extra amounts of vitamin A from food fortification may reduce the risk of T2DM. These results may have public health relevance, as they demonstrate that one of the most costly chronic diseases may be prevented by food fortification - a simple and affordable public health nutrition intervention.