Consuming a Mediterranean diet may lead to higher cognitive function, according to a recently published study.

Researchers at the National Eye Institute (NEI), which is part of the National Institutes of Health, led the analysis of data from two major eye disease studies — the Age-Related Eye Disease Study (AREDS) and AREDS2.

» RELATED: Air pollution exposure linked to increased risk of dementia, study says

The results of the new study were published in Alzheimer’s and Dementia: the Journal of the Alzheimer’s Association.

The Mediterranean diet is high in vegetables, fruit, whole grains, nuts, legumes, fish and olive oil. It also emphasizes lessening the consumption of alcohol.

In addition to the diet possibly boosting cognitive function, it may also contribute to slowing cognitive decline.

Over the course of several years, both age-related eye disease studies evaluated the effect of vitamins on age-related macular degeneration (AMD), an eye disease that causes vision loss. While AREDS featured patients with and without AMD, AREDS2 had only participants with AMD. Both studies had 4,000 participants.

In the beginning of each study, researchers evaluated participants for diet. While the AREDS study tested participants’ cognitive function at five years, the AREDS2 study tested cognitive function in participants at baseline and again at intervals of two, four, and 10 years. Researchers evaluated participants’ diet with a variety of tests. They also had participants fill out a questionnaire that asked for their average consumption of each component of the Mediterranean diet over the past year.

» RELATED: Study: Middle age may not be too late for lifestyle changes to reduce women's stroke risk

The results showed that participants who adhered most closely to the Mediterranean diet had the lowest risk of cognitive impairment. It appeared that consuming high amounts of fish and vegetables had the greatest positive effect. Researchers also found that after 10 years, ARED2 participants who consumed the highest rate of fish had the slowest rate of cognitive decline. Cognitive function scores showed that individuals likely won’t see a difference in daily function. However, the effects show that cognition and neutral health depend on diet at a population level, the study said.

Additionally, the study showed similar benefits of consuming a Mediterranean diet for people with and without the ApoE gene, which puts them at risk for Alzheimer's. That shows the effects of diet on cognition are independent of a genetic Alzheimer’s risk.

“We do not always pay attention to our diets. We need to explore how nutrition affects the brain and the eye” said Emily Chew, M.D., director of the NEI Division of Epidemiology and Clinical Applications and lead author of the studies.