When the former nurse Jamie Tyrone learned that she carried two copies of a gene called ApoE4, she “lost hope and direction,” and her “days were filled with fear, anxiety and sadness.” It meant that as she got older, she would likely develop Alzheimer’s disease, as her father had done before her.

The apoliprotein E gene, or ApoE, comes in three forms—E2, E3, and E4. The last one is the problem. People who carry one copy have a three-fold higher risk of Alzheimer’s than those with none. And those with two copies, as Tyrone carries, have 8- to 12-fold higher risks. Between 51 and 68 percent of them will develop the disease by the time they are 85. The risk is so large that some people who get their genomes analyzed (including James Watson, a co-discoverer of the DNA double helix) deliberately decide to redact their ApoE4 sequence. They’d rather not know.  

Even if ApoE4 carriers manage to dodge Alzheimer’s, they aren’t out of the woods. Compared to the general population, they tend to have higher cholesterol levels, a higher risk of heart disease, and a faster pace of mental decline during old age.

Despite all these drawbacks, the ApoE4 variant is surprisingly common. A quarter of white Americans carry a single copy, as do more than a third of African Americans. In other parts of the world, especially in the tropics and in northern Europe, the variant is even more common.

“It doesn’t make sense,” says Ben Trumble, from Arizona State University. “You’d have thought that natural selection would have weeded out ApoE4 a long time ago. The fact that we have it at all is a little bizarre.”

Trumble has now found an answer to this puzzle after studying the Tsimane, a group of indigenous people from the Bolivian Amazon. They live traditional lifestyles involving small-scale horticulture, fishing, and foraging. They don’t have access to sanitation or running water, and more than two-thirds of them are infected with worms and other intestinal parasites.

Among the Tsimane with the heaviest parasite burdens, ApoE4 actually protects against mental decline in old age. The variant has been described by some publication as “the forgetting gene,” but that’s because scientists have mostly studied it in Western and Asian populations. Among the parasite-infected Tsimane, it’s more of a “the remembering gene.”

Trumble’s team has been studying the Tsimane since 1999 to see how their health compares to people from urban Western societies. He and his colleagues travel between the 90 or so communities with a team of Bolivian doctors and biochemists, and a few Tsimane whom they trained as anthropologists. They draw blood, collect stool samples, and do medical exams. They check for parasite infections by measuring levels of immune cells. And recently, they interviewed 372 villagers between the ages of 6 and 88, giving them a battery of tests designed to measure their attention, memory, and other mental skills.  

Among the Tsimane as a whole, adults with E4 got poorer scores in these tests. But when the team focused on the people with high parasite levels, they saw that the E4 carriers had better mental skills, even outperforming E3 carriers who were parasite-free.  

It’s not clear why. The ApoE gene affects the movement of cholesterol and fatty acids through the brain. Perhaps the E4 variant keeps these nutrients away from parasites and so keeps their populations in check. That might, in turn, protect the brain. “Having parasites is bad for cognitive performance,” says Trumble. “If you’re having to spend a bunch of energy on ramping up your immune system, those are calories you can’t spend on growth.”  

Even with 372 volunteers, the team’s study is small, but they’ve been working to increase their numbers by almost four times. “That’s the big problem with gene-environment studies,” says Trumble. “In most hunter-gatherer populations, there just aren’t enough older individuals. The Tsimane are an interesting test case because more than 1,300 are over 40. And since they have no birth control, and now access to metal axes and motorized canoes, they’re growing faster than the baby boom in the U.S. That’s one of the reasons we started working with them.”

“It’s consistent with other studies indicating that E4 isn’t always the bad guy,” says Ruth Itzhaki, from the University of Manchester, whose own work showed that E4 might protect against liver damage caused by hepatitis C. Other researchers have found that E4-carrying children in Brazilian shanty towns did better in mental tests when carrying intestinal parasites, while those in Mexico City were better able to cope with lead exposure. This doesn’t explain why E4 remains common in many Western populations, but it does at least hint that the variant might be beneficial in other contexts that we haven’t discovered.

Indeed, E4 seems to be the original version of the ApoE gene, which existed at the dawn of humanity before the E2 and E3 versions arose. For most of our history, we had to cope with parasites galore, and perhaps the E4 variant helped our ancestors to cope with that burden, as it seems to do in today’s Tsimane. And perhaps the variant’s benefits that have since diminished as some societies embraced sanitation, clean water, and refrigeration.

“This highlights the importance of accounting for the wide variety of environments in which humans lived for most of our evolution, and in which we currently live,” says Trumble. “Post-industrial city life is just a blip in our history.”