Objectives: To evaluate the association between the Mediterranean diet (MedDiet) and the Mediterranean-DASH diet Intervention for Neurodegeneration Delay (MIND diet) and cognition in a nationally representative population of older U.S. adults. Design: Population-based cross-sectional study. Setting: Health and Retirement Study. Participants: Community-dwelling older adults (NÂ =Â 5,907; mean age 67.8Â Â±Â 10.8). Measurements: Adherence to dietary patterns was determined from food frequency questionnaires using criteria determined a priori to generate diet scores for the MedDiet (range 0â€”55) and MIND diet (range 0â€”15). Cognitive performance was measured using a composite test score of global cognitive function (range 0â€”27). Linear regression was used to compare cognitive performance according to tertiles of dietary pattern. Logistic regression was used to examine the association between dietary patterns and clinically significant cognitive impairment. Models were adjusted for age, sex, race, educational attainment, and other health and lifestyle covariates. Results: Participants with mid (odds ratio (OR)Â =Â 0.85, 95% confidence interval (CI)Â =Â 0.71â€”1.02, PÂ =Â .08) and high (OR 0.65, 95% CIÂ =Â 0.52â€”0.81, PÂ <Â .001) MedDiet scores were less likely to have poor cognitive performance than those with low scores in fully adjusted models. Results for the MIND diet were similar. Higher scores in each dietary pattern were independently associated with significantly better cognitive function (PÂ <Â .001) in a dose-response manner (P trendÂ <Â .001). Conclusion: In a large nationally representative population of older adults, greater adherence to the MedDiet and MIND diet was independently associated with better cognitive function and lower risk of cognitive impairment. Clinical trials are required to elucidate the role of dietary patterns in cognitive aging.