Taking B vitamins to stave off mental decline and Alzheimer's disease is likely to be a waste of time, research has shown.
Scientists said people would be better off eating more fruit and vegetables as part of a balanced diet.
Earlier claims had suggested that B vitamins may protect the brain.
Vitamins B9 - also known as folic acid - and B12 are known to reduce blood levels of a compound called homocysteine that has been linked to Alzheimer's.
According to the "homocysteine hypothesis", taking supplements of the vitamins could reduce the risk of developing the disease.
But a new study bringing together data from 11 trials involving 22,000 people suggests the theory is unfounded.
Although B vitamins did reduce blood levels of homocysteine by around a quarter, this had no effect on the mental abilities of participants.
Measures of mental processes such as memory, speed and executive function were the same for those taking the vitamins and dummy placebo pills.
Lead researcher Dr Robert Clarke, from Oxford University, said: "It would have been very nice to have found something different. Our study draws a line under the debate: B vitamins don't reduce cognitive decline as we age.
"Taking folic acid and vitamin B12 is sadly not going to prevent Alzheimer's disease."
The findings are published in the American Journal of Clinical Nutrition.
Taking folic acid supplements before and during early pregnancy has been shown to reduce a woman's risk of having a baby with a neural tube defect, such as spina bifida.
Many countries have adopted population-wide folic acid food fortification programmes.
But the idea that B vitamins can slow the slide towards mental decline or Alzheimer's is much more controversial.
Dr Clarke added: "Taking supplements like B vitamins doesn't prevent heart disease, stroke or cognitive decline.
"About 25% to 30% of the adult population take multi-vitamins, often with the idea that they are also good for the heart or the brain, but the evidence just isn't there.
"Much better is to eat more fruit and vegetables, avoid too much red meat and too many calories, and have a balanced diet."
Dr Simon Ridley, head of science at Alzheimer's Research UK, said: "Although one trial in 2010 showed that for people with high homocysteine, B vitamins had some beneficial effect on the rate of brain shrinkage, this comprehensive review of several trials shows that B vitamins have not been able to slow mental decline as we age, nor are they likely to prevent Alzheimer's.
"While the outcome of this new and far-reaching analysis is not what we hoped for, it does underline the need for larger studies to improve certainty around the effects of any treatment."
Dr James Pickett, head of research at the Alzheimer's Society, said: "While taking B vitamins may not help everyone, they may have some benefits in specific groups of people with dementia.
"However, this study suggests that we need much more work to establish more evidence for this."
Hugh Perry, chairman of the Medical Research Council (MRC) Neurosciences and Mental Health Board, said: "Science progresses through testing and re-testing previous research and sometimes overturning existing theories.
"Health advice always needs to be based on the best available data from the largest possible studies and this is even more important when the findings have implications for what we do or don't eat and drink."
The research was partly funded by the MRC and Department of Health.