Humans have evolved unique genes that protect older adults against the ravages of Alzheimer's and other neurodegenerative diseases, research suggests.
One of the gene variants is four times more abundant in humans than it is in chimpanzees, our closest animal cousins.
Natural selection preserved the mutations to ensure older and wiser individuals continue to benefit their communities, scientists believe.
The discovery lends support to the "grandmother hypothesis" that offers an explanation for why humans live so long after the end of their reproductive age.
According to the theory, elders contribute to the fitness of younger individuals by caring for grandchildren and handing down important cultural knowledge.
But this role would be seriously undermined if large numbers of people suffered serious age-related mental decline and became a burden instead of an asset.
As a result, genes that leave us vulnerable to neurodegenerative disease have been weeded out over time while variants offering protection have been retained, it is claimed.
US lead scientist Professor Ajit Varki, from the University of California at San Diego (UC San Diego), said: "We unexpectedly discovered that humans have evolved gene variants that can help protect the elderly from dementia.
"Such genes likely evolved to preserve valuable and wise grandmothers and other elders, as well as to delay or prevent the emergence of dependent individuals who could divert resources and effort away from the care of the young."
The researchers, whose findings appear in the journal Proceedings of the National Academy of Sciences, began by focusing on a gene for the protein CD33, which keeps immune reactions in check and prevents unwanted inflammation.
Previous studies had suggested a certain form of CD33 suppressed the formation of beta amyloid protein fragments in the brain. Beta amyloid accumulation is a key hallmark of late-onset Alzheimer's.
A comparison study found levels of the protective CD33 variant are four times higher in humans than in chimpanzees.
The team went on to discover human-specific mutations that appear to play a role in preventing mental decline in a number of other genes.
One of those genes is APOE4, which in its ancestral form is a notorious risk factor for Alzheimer's. Two of its human variants, APOE2 and APOE3, are believed to offer protection against dementia.
Co-author Dr Pascal Gagneux, from the UC San Diego/Salk Centre for Academic Research and Training in Anthopogeny (Carta), said: "When elderly people succumb to dementia, the community not only loses important sources of wisdom, accumulated knowledge and culture, but elders with even mild cognitive decline who have influential positions can harm their social groups by making flawed decisions.
"Our study does not directly prove that these factors were involved in the selection of protective variants of CD33, APOE and other genes, but it is reasonable to speculate about the possibility.
"After all, inter-generational care of the young and information transfer is an important factor for the survival of younger kin in the group and across wider social networks or tribes."