Moderate alcohol use can contribute to a diet with better results for memory skills in middle age, research has showed.
The regime also emphasised eating fruit, pulses, vegetables, low-fat dairy and fish and avoiding common unhealthy food.
Claire McEvoy said: "It's possible that moderate alcohol consumption as part of a healthy diet could be important for brain health in middle age, but further research is needed to confirm these findings."
Researchers found that after 30 years of follow-up, people with high adherence to the Mediterranean diet were 46% less likely to have poor thinking and memory skills compared with people with low adherence.
Those with high adherence to a diet emphasising moderate alcohol use and limiting fried food and salty snacks or high-fat dairy were 52% less likely to have poor thinking and memory skills than people with low adherence, the study also showed.
It was published in the online issue of Neurology, the medical journal of the American Academy of Neurology.
The lead author was Dr McEvoy, from the university's Institute for Global Food Security, while Kristine Yaffe from the University of California, San Francisco, was senior author.
Dr McEvoy added: "Our findings indicate that maintaining good dietary practices throughout adulthood can help to preserve brain health at midlife."
The study involved 2,621 people from the Cardia (Coronary Artery Risk Development in young Adults) study in the US, who were an average age of 25 at the start and then followed for 30 years.
They were asked about their diet at the beginning of the study and twice again, after seven and 20 years.
Dr McEvoy added: "While we don't yet know the ideal dietary pattern for brain health, changing to a heart-healthy diet could be a relatively easy and effective way to reduce the risk for developing problems with thinking and memory as we age."
The NHS recommends not regularly drinking more than 14 units of alcohol a week.