Objective: Anxiety and depression frequently co-occur in the elderly and in patients with dementia. Prior research has shown that depression is related to the risk of dementia, but the effect of anxiety on dementia remains unclear. We studied whether anxiety symptoms and anxiety disorders are associated with the risk of dementia and cognition. Methods: We studied 2,708 nondemented participants from the prospective, population-based Rotterdam Study who underwent the Hospital Anxiety and Depression Scale (HADS) (sample I, baseline 1993-1995) and 3,069 nondemented participants who underwent screening for anxiety disorders (sample II, baseline 2002-2004). In 1993-1995, anxiety symptoms were assessed using the HADS. In 2002-2004, anxiety disorders were assessed using the Diagnostic and Statistical Manual of Mental Disorders, Fourth Edition. In both study samples, participants were continuously monitored for dementia until January 1, 2011. Cognition was tested in 2002-2004 and at a follow-up visit in 2009-2011 in sample II only. Results: In sample I, 358 persons developed dementia, and in sample II, 248 persons developed dementia. We did not find an association with the risk of dementia for anxiety symptoms (hazard ratio 1.05, 95% confidence interval: 0.77-1.43, Wald statistic 0.08, p = 0.77, df = 1) or for anxiety disorders (hazard ratio 0.92, 95% confidence interval: 0.58-1.45, Wald statistic 0.14, p = 0.71, df = 1). We could demonstrate an association of anxiety disorders with poor cognition cross-sectionally, but this attenuated after additional adjustments. Conclusion: Our findings do not offer evidence for an association between anxiety symptoms or anxiety disorders with the risk of dementia or with cognition. This suggests that anxiety is not a risk factor nor a prodrome of dementia in an elderly, community-dwelling population.