If you want to ward off dementia and Alzheimer's disease, make sure you eat a diet rich in fish, omega-3 oils, fruits and veggies, according to the findings of a new study published in Neurology, the medical journal of the American Academy of Neurology.

Researchers in France analyzed the diets of more than 8,000 healthy men and women over the age of 65.

They found people who regularly ate omega-3 rich oils, such as canola, flaxseed and walnut oil, reduced their risk of dementia by 60 percent, while people who ate fruits and vegetables daily reduced their risk of dementia by 30 percent.

The four-year study also found people who ate fish at least once a week had a 35 percent lower risk of Alzheimer's disease and 40 percent lower risk of dementia, but only if they did not carry the gene that increases the risk of Alzheimer's, called apolipoprotein E4, or ApoE4.

“Given that most people do not carry the ApoE4 gene, these results could have considerable implications in terms of public health,” said study author Dr. Pascale Barberger-Gateau, from the French National Institute for Health and Medical Research, in a news release.

However, the study found people who did not carry the ApoE4 gene and consumed an unbalanced diet rich in omega-6 oils, such as sunflower oil, rather than omega-3, were twice as likely to develop dementia compared to those who did not.

“While we’ve identified dietary patterns associated with lowering a person’s risk of dementia or Alzheimer's, more research is needed to better understand the mechanisms of these nutrients involved in these apparently protective foods,” said Barberger-Gateau.