Over the past three decades, the number of people with diabetes mellitus has more than doubled globally, making it one of the most important public health challenges to all nations. Type 2 diabetes mellitus (T2DM) and prediabetes are increasingly observed among children, adolescents and younger adults. The causes of the epidemic of T2DM are embedded in a very complex group of genetic and epigenetic systems interacting within an equally complex societal framework that determines behavior and environmental influences. This complexity is reflected in the diverse topics discussed in this Review. In the past few years considerable emphasis has been placed on the effect of the intrauterine environment in the epidemic of T2DM, particularly in the early onset of T2DM and obesity. Prevention of T2DM is a 'whole-of-life' task and requires an integrated approach operating from the origin of the disease. Future research is necessary to better understand the potential role of remaining factors, such as genetic predisposition and maternal environment, to help shape prevention programs. The potential effect on global diabetes surveillance of using HbA(1c) rather than glucose values in the diagnosis of T2DM is also discussed.