Previous observational studies reported beneficial effects of the Mediterranean diet (MedDiet) on cognitive function, but results were inconsistent. We assessed the effect on cognition of a nutritional intervention using MedDiets in comparison with a low-fat control diet.We assessed 522 participants at high vascular risk (44.6% men, age 74.6 ± 5.7 years at cognitive evaluation) enrolled in a multicentre, randomised, primary prevention trial (PREDIMED), after a nutritional intervention comparing two MedDiets (supplemented with either extra-virgin olive oil (EVOO) or mixed nuts) versus a low-fat control diet. Global cognitive performance was examined by Mini-Mental State Examination (MMSE) and Clock Drawing Test (CDT) after 6.5 years of nutritional intervention. Researchers who assessed the outcome were blinded to group assignment. We used general linear models to control for potential confounding.After adjustment for sex, age, education, Apolipoprotein E genotype, family history of cognitive impairment/dementia, smoking, physical activity, body mass index, hypertension, dyslipidaemia, diabetes, alcohol and total energy intake, participants allocated to the MedDiet+EVOO showed higher mean MMSE and CDT scores with significant differences versus control (adjusted differences: +0.62 95% CI +0.18 to +1.05, p=0.005 for MMSE, and +0.51 95% CI +0.20 to +0.82, p=0.001 for CDT). The adjusted means of MMSE and CDT scores were also higher for participants allocated to the MedDiet+Nuts versus control (adjusted differences: +0.57 (95% CI +0.11 to +1.03), p=0.015 for MMSE and +0.33 (95% CI +0.003 to +0.67), p=0.048 for CDT). These results did not differ after controlling for incident depression.An intervention with MedDiets enhanced with either EVOO or nuts appears to improve cognition compared with a low-fat diet. ISRCTN:35739639.