Uric acid is a risk factor of cardiovascular disease, as well as a major natural antioxidant, prohibiting the occurrence of cellular damage. The relation between uric acid and cognitive decline, in which both vascular mechanisms and oxidative stress are thought to play a role, is unknown. Therefore we assessed the relation between serum uric acid levels and the risk of subsequent dementia in a prospective population-based cohort study among 4618 participants aged 55 years and over. Additionally, we investigated the relation between serum uric acid and cognitive function later in life (on average 11.1 years later) in a subsample of 1724 participants who remained free of dementia during follow-up. All analyses were adjusted for age, sex and cardiovascular risk factors. Our data showed that only after correcting for several cardiovascular risk factors, higher serum uric acid levels were associated with a decreased risk of dementia (HR, adjusted for age, sex and cardiovascular risk factors, 0.89 [95% confidence interval (CI) 0.80-0.99] per standard deviation (SD) increase in uric acid). In participants who remained free of dementia, higher serum uric acid levels at baseline were associated with better cognitive function later in life, for all cognitive domains that were assessed [adjusted difference in Z-score (95% CI) per SD increase in uric acid 0.04 (0.00-0.07) for global cognitive function; 0.02 (-0.02 to 0.06) for executive function; and 0.06 (0.02-0.11) for memory function], but again only after correcting for cardiovascular risk factors. We conclude that notwithstanding the associated increased risk of cardiovascular disease, higher levels of uric acid are associated with a decreased risk of dementia and better cognitive function later in life.