Mediterranean and low-fat diets are effective in the primary prevention of cardiovascular disease. We did a long-term randomised trial to compare the effects of these two diets in secondary prevention of cardiovascular disease.The CORDIOPREV study was a single-centre, randomised clinical trial done at the Reina Sofia University Hospital in Córdoba, Spain. Patients with established coronary heart disease (aged 20-75 years) were randomly assigned in a 1:1 ratio by the Andalusian School of Public Health to receive a Mediterranean diet or a low-fat diet intervention, with a follow-up of 7 years. Clinical investigators (physicians, investigators, and clinical endpoint committee members) were masked to treatment assignment; participants were not. A team of dietitians did the dietary interventions. The primary outcome (assessed by intention to treat) was a composite of major cardiovascular events, including myocardial infarction, revascularisation, ischaemic stroke, peripheral artery disease, and cardiovascular death. This study is registered with ClinicalTrials.gov, NCT00924937.From Oct 1, 2009, to Feb 28, 2012, a total of 1002 patients were enrolled, 500 (49·9%) in the low-fat diet group and 502 (50·1%) in the Mediterranean diet group. The mean age was 59·5 years (SD 8·7) and 827 (82·5%) of 1002 patients were men. The primary endpoint occurred in 198 participants: 87 in the Mediterranean diet group and 111 in the low-fat group (crude rate per 1000 person-years: 28·1 [95% CI 27·9-28·3] in the Mediterranean diet group vs 37·7 [37·5-37·9] in the low-fat group, log-rank p=0·039). Multivariable-adjusted hazard ratios (HRs) of the different models ranged from 0·719 (95% CI 0·541-0·957) to 0·753 (0·568-0·998) in favour of the Mediterranean diet. These effects were more evident in men, with primary endpoints occurring in 67 (16·2%) of 414 men in the Mediterranean diet group versus 94 (22·8%) of 413 men in the low-fat diet group (multiadjusted HR 0·669 [95% CI 0·489-0·915], log-rank p=0·013), than in 175 women for whom no difference was found between groups.In secondary prevention, the Mediterranean diet was superior to the low-fat diet in preventing major cardiovascular events. Our results are relevant to clinical practice, supporting the use of the Mediterranean diet in secondary prevention.Fundacion Patrimonio Comunal Olivarero; Fundacion Centro para la Excelencia en Investigacion sobre Aceite de Oliva y Salud; local, regional, and national Spanish Governments; European Union.