Any crime drama connoisseur can tell you: arsenic is a killer. At high doses, it can lead to skin lesions, liver damage, cancers, multi-organ failure and cardiac arrest. But most instances of arsenic poisoning don’t come from a murder plot. Rather, the naturally occurring toxin most typically enters the body through environmental or occupational exposure.

That’s the case for one remote village in the Andes, where arsenic leaches into the drinking water from volcanic bedrock below. When tested, the water in San Antonio de los Cobres was found to contain 20 times the level of arsenic deemed safe by the World Health Organization. And this isn’t a new development: analyses of 400- to 7,000-year-old mummies from the region have shown evidence of high arsenic levels in their hair.

So, how have residents been able to survive for centuries at the site? As a new study indicates, the key is in their genes.

A team of scientists analyzed the DNA of 124 women from the northern Argentina village and discovered that “about a quarter of the population had picked up a cluster of mutations in the gene that processes arsenic into a less toxic form,” NPR reports. The genetic difference allows villagers to more quickly process the poison, thereby flushing it from their system faster than the average person. The researchers speculate that those with this genetically-enhanced arsenic tolerance were more likely to survive and pass the trait on to their descendants.

Researchers still aren’t completely sure how the mutation works within the body, and they haven’t yet performed testing on arsenic’s specific effects on the population of San Antonio de los Cobres. But, though genetic mutations providing protection from arsenic are found in peoples all over the world, this study is the first to show “evidence of a population uniquely adapted to tolerate the toxic chemical,” Oxford University Press reports.

This little village isn’t the only locale dealing with naturally high arsenic levels. As Newsweek notes, “more than 100 million people are exposed to elevated levels of arsenic in their drinking water.” Though the U.S. has regulations and testing to prevent unsafe levels of the toxin in water, it still exists in mostly small concentrations in certain regions. To see where in the country trace elements are present, check out this map drawn up by the U.S. Geological Survey.