Dementia is three times more common in people whose blood is low in folates, a form of vitamin B particularly found in green vegetables, a study suggests.
Broccoli is one of the foods which contains folic acid
The Journal of Neurology, Neurosurgery and Psychiatry study followed 518 South Korean pensioners for two years.
There is growing evidence linking levels of folates - or folic acid - and Alzheimer's disease, though deficiency could be a symptom of dementia.
The UK is currently considering adding the vitamin to bread and flour.
This is primarily for the benefit of pregnant women and their unborn children, as folic acid has been proven to prevent spinal problems in the growing foetus, but research increasingly suggests it could also ward off dementia.
However, the exact relationship between folate deficiency and dementia remains unclear, as it could well be a symptom as much as a cause.
The team led by the Chonnam National University Medical School in Gwangju acknowledged this in their study, noting that "changes in micronutrients could be linked with the other typical signs that precede dementia, including weight loss and low blood pressure.
"While weight loss is unlikely to alter micronutrients in the blood, it may indicate dietary changes in the quality of food intake."
They found that 3.5% of their study group were folate deficient to start with. These people were 3.5 times more likely to have developed dementia by the end of the study.
The disease was more common in those who were older, relatively poorly educated and inactive, the researchers found.
Clive Ballard, director of research at the Alzheimer's Society, said the study was "one further example of why it is so crucial for people to lead a healthy lifestyle with a balanced diet rich in B vitamins and antioxidants".
But he warned: "The potential benefits in preventing or treating dementia can only be fully verified in a rigorous clinical trial, as overlap with other lifestyle factors and lifestyle changes in the very early stages of dementia can give misleading results."