Aims/hypothesis Accumulating evidence suggests that diabetes increases the risk of dementia, but few studies have addressed possible mechanisms underlying this relationship. The aim of our study was to investigate the longitudinal association of glucose metabolism, insulin secretion and insulin action with the development of Alzheimer's disease and vascular dementia. Methods The Uppsala Longitudinal Study of Adult Men is an ongoing observational study in Sweden in which 1,125 men aged 71 years and free from dementia underwent an OGTT and a euglycaemic insulin clamp between 1990 and 1995. During a median follow-up of 12 years, 257 persons developed dementia or cognitive impairment, of whom 81 had Alzheimer's disease and 26 vascular dementia. Associations were analysed with the Cox proportional hazards method. Results Low early insulin response to oral glucose challenge, but not low insulin sensitivity, was associated with a higher risk of Alzheimer's disease (HR for 1 SD decrease 1.32; 95% CI 1.02, 1.69) after adjustment for diabetes, blood pressure, body mass index, cholesterol, smoking and educational level. Low insulin sensitivity was associated with a higher risk of vascular dementia (HR for 1 SD decrease 1.55; 95% CI 1.02, 2.35), but not after multiple adjustments. Diabetes increased the risk of any dementia and cognitive impairment by 63%. Conclusions/interpretation In this community-based study, low early insulin response was associated with increased risk of subsequent Alzheimer's disease, whereas low insulin sensitivity was not. Vascular dementia was not related to early insulin response. We suggest that glucometabolic disturbances are linked differentially to the pathogenesis of these two main dementia subtypes.