(HealthDay News) -- People who eat plenty of fruits and veggies may preserve more of their memory and thinking skills as they grow old, a new large study suggests.

The findings, published online May 6 in the journal Neurology, add to a growing body of evidence linking healthy eating habits to a lower risk of dementia.

Researchers found that among nearly 28,000 older adults from 40 countries, those who scored in the top 20 percent on a "healthy eating" scale were less likely to show declines in memory, attention and other mental skills over the next five years.

Compared with older adults who favored foods like red meat and sweets, the risk of mental decline for the healthiest eating group was about one-quarter lower. Among the people with the healthiest diet, about 14 percent showed declines in thinking, compared to about 18 percent of those with the least healthy diets.

The study does not prove that diet, by itself, confers the benefit, said lead researcher Andrew Smyth, a fellow at McMaster University in Hamilton, Ontario, Canada.

But he said his team accounted for some other explanations -- including the fact that people with healthy eating habits may be more educated, thinner, get more exercise or be less likely to smoke.

And what is "healthy eating" when it comes to preserving your mental acuity?

In this study, Smyth's team scored people's usual diets using a "healthy eating" index. A high score, Smyth said, meant that a person eats plenty of healthy choices, like fruits and vegetables, and few dubious choices, like deep-fried foods.

But no one knows for certain what the optimal brain diet looks like, according to Christy Tangney, a professor of clinical nutrition at Rush University in Chicago.

Tangney, who was not involved in the new research, studies diet and dementia risk. In a recent study, she and her colleagues found that older adults with an eating pattern they dubbed the "MIND diet" had a lower risk of developing Alzheimer's disease.

That diet, Tangney said, is essentially a hybrid of the famous Mediterranean diet and the DASH (Dietary Approaches to Stop Hypertension) diet -- both of which can help ward off heart disease and stroke.

But, Tangney said, the diet has not been proven to stave off dementia. That's because it hasn't been put to the scientific test in a clinical trial, where people would be randomly assigned to follow the diet or not.

In general, Tangney said, research into diet and the aging brain needs to "move on to the next phase."

"That means the clinical trial stage," she said. Unfortunately, she added, such diet studies are complicated and expensive -- and funding can be hard to come by.

Why would healthy food choices help preserve your memory as you age? One possibility, according to Smyth's team, is that the anti-inflammatory nutrients in foods like fruits, vegetables and fish help preserve brain health.

Plus, what's good for the heart is often good for the brain -- by lowering blood pressure, improving blood flow, or possibly staving off subtle, "covert" strokes, according to Smyth.

Tangney said that since the DASH and Mediterranean diets are proven to benefit cardiovascular health, they are wise choices.

"There are foods common to both that can help protect you against heart disease and stroke -- and potentially cognitive decline," she said.

Tangney acknowledged that it can be hard for people to change ingrained eating habits, especially if they are surrounded by fast food and vending machines in their daily lives.