Berries are good for the brain, according to a study that suggests the fruits can help fend off the mental decline of aging.

Women who ate one or more servings of blueberries or two or more servings of strawberries a week over two decades had minds that, based on memory tests, were 2.5 years younger than those who ate little to no berries, research Thursday in the Annals of Neurology showed.

Blueberries and strawberries are rich in a flavonoid called anthocyanidins, which are known to cross from the blood into the brain and locate in the parts involved in learning and memory, said study author Elizabeth Devore. Flavonoids also may help mitigate the effects of stress and inflammation that could contribute to cognitive decline, she said.

Read more from Bloomberg News.