You may want to think twice about mixing in unhealthy foods while you’re on the Mediterranean diet.

New research from Rush University Medical Center shows that eating lots of foods that aren’t good for you while consuming the diet high in vegetables, fruits, legumes, olive oil and fish can lead to reduced benefits of the Mediterranean diet.

The study’s results were published Jan. 7 in “Alzheimer’s & Dementia: The Journal of the Alzheimer’s Association.”

“Eating a diet that emphasizes vegetables, fruit, fish and whole grains may positively affects a person’s health,” Puja Agarwal, Ph.D., a nutritional epidemiologist and assistant professor in the Department of Internal Medicine at Rush Medical College said in a press release. “But when it is combined with fried food, sweets, refined grains, red meat and processed meat, we observed that the benefits of eating the Mediterranean part of the diet seems to be diminished.”

Researchers observed 5,001 older adults living in Chicago for the study. Participants were part of the Chicago Health and Aging Project, which from 1993 to 2012 analyzed cognitive health in adults over the age of 65. Study participants completed a cognitive assessment questionnaire every three years that examined basic information-processing skills and memory. They also completed a survey about the regularity with which they ate 144 foods.

Scientists evaluated how closely participants adhered to the Mediterranean diet and how much they consumed a Western diet. The latter includes sweets, fried foods, red and processed meats, full-fat dairy and pizza.

Scores of zero to five were assigned for each food item to gather a Mediterranean diet score for each participant ranging from zero to 55.

When analyzing the link between the Mediterranean diet scores and shifts in participants’ global cognitive function, episodic memory and perceptual speed, it was determined that those who followed the diet most closely had slower cognitive decline over the years. Meanwhile, those whose diet aligned more with the Western diet has no benefit of healthy food consumption when it came to slowing cognitive decline.

“Western diets may adversely affect cognitive health,” Agarwal said. “Individuals who had a high Mediterranean diet score compared to those who had the lowest score were equivalent to being 5.8 years younger in age cognitively.”

She added that the results complement other studies demonstrating a Mediterranean diet decreases the risk of heart disease, certain cancers and diabetes and backs other studies of the Mediterranean diet’s effect on cognition.

“The more we can incorporate green leafy vegetables, other vegetables, berries, olive oil, and fish into our diets, the better it is for our aging brains and bodies. Other studies show that red and processed meat, fried food and low whole grains intake are associated with higher inflammation and faster cognitive decline in older ages,” Agarwal said. “To benefit from diets such as the Mediterranean diet, or MIND diet, we would have to limit our consumption of processed foods and other unhealthy foods such as fried foods and sweets.”