Obesity has been associated with increased risk of cognitive impairment or dementia, but recent findings are contradictory, possibly due to methodological differences. The present study tries to clarify these inconsistencies by following the cognitive trajectories of individuals with obesity over 12 years and studying the effect of obesity status (obesity at baseline versus incident obesity at follow-up), chronicity, definition, potential confounding (e.g. age, cardiovascular factors), and non-linear associations. Longitudinal study with 12 years follow-up. Community based. 1,807 cognitively healthy individuals (aged 24-83) from the Maastricht Aging Study (1992-2004). Memory, executive function and processing speed were assessed at baseline and at 6- and 12-year follow-up. Obesity was defined as having a body mass index (BMI) of >= 30.0 kg/m(2) or waist circumference (WC) of >102 cm for men and >88 cm for women. At baseline, 545 persons were obese (BMI: 329 (18%); WC: 494 (27%); both: 278 (15%). They showed faster decline in memory, executive function, and processing speed. Chronic obese showed less widespread impairment than those who regained normal weight. Associations across cognitive domains were weaker for obesity defined by BMI than for WC. At follow-up, 190 developed obesity, and they performed worse on executive function at baseline, but showed less decline compared with participants with normal weight. Yet, age-stratification and post-hoc analyses showed that most of these associations were confounded by age. This study shows that the association between obesity and cognitive decline was confounded by the effect of age on rate of decline. Future studies should take this into account.