Background and Purpose: Atrial fibrillation is a frequent disorder in the elderly and a known risk factor for cerebrovascular stroke. We investigated the association of atrial fibrillation with dementia and cognitive impairment in a large cross-sectional, population-based study in the elderly. Methods: Of the 6584 participants in the Rotterdam Study aged 55 to 106 years, detailed information on dementia status and ECG abnormalities was available. Dementia was diagnosed in three phases. First, participants were screened. Screen-positive subjects were tested further. Those with possible dementia underwent an extensive diagnostic workup. Dementia and dementia subtypes were diagnosed according to prevailing criteria. Cognitive impairment was defined as a Mini-Mental State Examination test score of <26 points for a nondemented subject. Results: Atrial fibrillation was diagnosed in 195, dementia in 276, and cognitive impairment in 635 subjects. We found significant positive associations of atrial fibrillation with both dementia and impaired cognitive function (age- and sex-adjusted odds ratios, 2.3 [95% confidence interval, 1.4 to 3.7] and 1.7 [95% confidence interval, 1.2 to 2.5]), respectively). The strongest association was found not for vascular dementia but rather for Alzheimer's disease with cerebrovascular disease. The associations were stronger in women, and the relation with dementia was more pronounced in the relatively younger elderly. A history of stroke in subjects with atrial fibrillation could not account for these associations. Conclusions: Dementia and subtypes Alzheimer's disease and vascular dementia may be related to atrial fibrillation even if no clinical stokes have occurred.