Aims/hypothesis Diabetes mellitus is a risk factor for the development of cognitive impairment and dementia in the general population up to 75 years of age. As part of the Leiden 85-plus Study we studied the effects of diabetes on cognition in the oldest old. Subjects and methods The Leiden 85-plus Study is a prospective population-based study of 599 persons from age 85 onward. Cognitive function was assessed each year from ages 85 to 90 by means of four neuropsychological tests. The presence of diabetes and vascular disease was recorded at baseline, HbA 1c was assessed by means of a blood sample at ages 85 and 90. The cross-sectional and prospective associations between diabetes and cognitive function were analysed with linear mixed models, adjusted for sex and level of education. Results At age 85, diabetes was associated with a lower level of cognitive functioning on the Letter Digit Coding test and the Stroop Test. Diabetes was not associated with accelerated cognitive decline during follow-up. Within the group of diabetic patients, macrovascular disease was the most important determinant of cognitive dysfunction. Conclusions/interpretation The association between diabetes and accelerated cognitive decline, which has been documented previously in patients up to 75 years of age, may be less evident after age 85. This suggests that the damage occurs in previous years and that therapies aimed at preventing cognitive decline and dementia should focus on the younger old.