Researchers say villagers in the Papua New Guinea highlands who survived after consuming human brains have gained a genetic mutation that protects them against the brain disease called Kuru.
Dr Simon Mead of the University College London Institute and his colleagues studied more than 3,000 Papuans, including 709 who participated in cannibalistic mortuary feasts.
They included 152 who died of Kuru, which is caused by prions, the unusually folded brain proteins that also cause mad cow disease.
Kuru once wiped out entire generations of women in PNG villages and was traced to them having eaten the brains of their dead relatives.
It can be transmitted by eating contaminated body parts and is fatal and incurable.
The researchers also found a mutation called G127V that protected people from the disease.
In the New England Journal of Medicine, the researchers say their studies show the protective gene might lead to a treatment for similar brain-wasting conditions.