Sunlight is one source of vitamin D
Scientists have produced more evidence that vitamin D has an important role in keeping the brain in good working order in later life.
A study of over 3,000 European men aged 40-79 found those with high vitamin D levels performed better on memory and information processing tests.
The University of Manchester team believe vitamin D may protect cells or key signalling pathways in the brain.
The study features in the Journal of Neurology Neurosurgery and Psychiatry.
It follows research published in January which suggested that high levels of vitamin D can help stave off the mental decline that can affect people in old age.
The latest study focused on men from eight cities across Europe.
Their mental agility was assessed using a range of tests, and samples were taken to measure levels of vitamin D in their blood.
Men with high vitamin D levels performed best, with those who had the lowest levels - 35 nmol/litre or under - registering poor scores.
The researchers said the reason why vitamin D - found in fish and produced by sun exposure - seemed to aid mental performance was unclear.
They suggested it might trigger an increase in protective hormonal activity in the brain. However, the only data to back this up so far comes from animal studies.
There is also some evidence that vitamin D can dampen down an over-active immune system.
Alternatively, it may boost levels of antioxidants that in effect detoxify the brain.
The researchers stressed that many people, particularly in older age, were vitamin D deficient.
Therefore, if it were possible to stave off the effects on ageing on the brain with vitamin D supplements the implications for the health of the population could be significant.
Professor Tim Spector, of King's College London, has carried out research into the effect of vitamin D on ageing.
He said: "This is further evidence from observational studies that vitamin D is likely to be beneficial to reduce many age-related diseases.
"Taken together with similar data that shows its importance in reducing arthritis, osteoporotic fractures, as well as heart disease and some cancers, this underscores the importance of vitamin D for humans and why evolution gave us a liking for the sun.
"We also know that our genes also determine our vitamin D levels which explains why individuals can vary so much.
"We now need to study the best way to give using vitamin D properly in prevention."
Dr Iain Lang, of the Peninsula Medical School in Exeter, carried out the earlier research.
He agreed there was mounting evidence suggesting vitamin D was good for the brain, but warned that it was possible that poor mental performance could be down to an inadequate diet, of which vitamin D deficiency might be just one manifestation.