BACKGROUND: Results of prospective studies examining the association between 25 hydroxyvitamin D (25[OH]D) levels and cognitive decline have been inconsistent. We tested the hypothesis that lower 25(OH)D levels are associated with a greater likelihood of cognitive impairment and risk of cognitive decline. METHODS: The study is a cross-sectional and longitudinal analysis of a prospective cohort of 6,257 community-dwelling elderly women followed for 4 years. Global cognitive function was measured by the Modified Mini-Mental State Examination and executive function was measured by Trail Making Test Part B (Trails B). Cognitive impairment at baseline was defined as a score >1.5 SD below the sample mean; cognitive decline was defined as decline from baseline to follow-up >1 SD from mean change in score. RESULTS: Women with very low vitamin D levels had an increased odds of global cognitive impairment at baseline: odds ratio (95% confidence interval), 1.60 (1.05-2.42) for women with 25(OH)D <10 ng/mL (25 nmol/L) compared with those with 25(OH)D levels >/=30 ng/mL (75 nmol/L). Compared with women with baseline 25(OH)D level >/=30 ng/mL (75 nmol/L), women with lower levels had an increased risk of global cognitive decline: odds ratio (95% confidence interval), 1.58(1.12-2.22) for women with levels <10 ng/mL (25 nmol/L), and 1.31 (1.04-1.64) for those with levels 10-19.9 ng/mL (25-49 nmol/L). Levels of 25(OH)D were not associated with executive cognitive function. CONCLUSIONS: Low 25(OH)D levels among older women were associated with a higher odds of global cognitive impairment and a higher risk of global cognitive decline.