A colossal study has revealed a variation of a gene involved in an immune response has been secretly giving protection to the billions who carry it from Alzheimer's and Parkinson's disease.

Known as DR4, the variant, or allele, is part of a family of genes that normally help our immune system pinpoint and destroy foreign invaders, like bacteria and viruses.

"In an earlier study, we'd found that carrying the DR4 allele seemed to protect against Parkinson's disease," says psychiatrist and geneticist Emmanual Mignot from Stanford University in the US, the institution that led the study.

But Alzheimer's and Parkinson's are distinct conditions with different pathological biomarkers in the brain – Lewy bodies for Parkinson's, and abnormal tangles of a protein called tau in Alzheimer's.

Discovering DR4 as a common factor was astounding.

"That this protective factor for Parkinson's wound up having the same protective effect with respect to Alzheimer's floored me," Mignot says. "The night after we found that out, I couldn't sleep."

The scientists gathered medical and genetic data from dozens of databanks around the world, giving them a diverse dataset that included participants from Europe, Asia, Latin America, and African America.

Comparing 176,000 patients with Parkinson's or Alzheimer's disease with just under 2 million control cases revealed those who carried the DR4 variant were significantly less likely to have either disease – more than 10 percent less likely, in fact.

The researchers then studied data from 7,000 autopsied brains affected by Alzheimer's, finding those with the DR4 gene mutation had a later onset of symptoms and fewer neurofibrillary tangles, which correlate with the severity of the condition.

Biomarkers of Alzheimer's, the pernicious knotted proteins feature altered (acetylated) versions of the protein tau. One fragment in particular, known as acetylated PHF6 (a-PHF6) is crucial to forming these clumps.

Lab experiments revealed DR4 proteins bound strongly to this fragment. Thanks to this robust connection, the immune system recognizes the tangled tau as foreign and boots its problematic butt out as it would if it were a virus or bacteria.

Even though the tangles aren't a mechanism for Parkinson's, carrying DR4 correlated with symptoms starting later in that disease, too. Another win for DR4.

"This immune response would protect against Alzheimer's, Parkinson's, and neurodegeneration," the researchers write.

While led by Stanford University, this research was a global effort, involving some 160 additional researchers from 25 countries. But then, our two most common neurodegenerative conditions are global diseases.

Tens of millions of people around the world are diagnosed with Alzheimer's disease, while another 10 million live with Parkinson's. These numbers will grow as the proportion of the population over 65 increases.

For the 20 and 30 percent of the population who carry the DR4 variant, there could be more good news. Vaccination with a-PHF6 could ramp up the effects of the DR4 variant to further protect its carriers from neurological diseases, the researchers report.

A simple blood test could be used to identify people who have the DR4 variant.

This research was published in Proceedings of the National Academy of Sciences.