A gene that allows present-day people to cope with life at high altitude was inherited from an extinct species of human, Nature journal has reported.
The variant of the EPAS-1 gene, which affects blood oxygen, is common in Tibetans - many of whom live at altitudes of 4,000m all year round.
But the DNA sequence matches one found in the extinct Denisovan people.
Many of us carry DNA from extinct humans who interbred with our ancestors as the latter expanded out of Africa.
Both the Neanderthals - who emerged around 400,000 years ago and lived in Europe and western Asia until 35,000 years ago - and the enigmatic Denisovans contributed DNA to present-day people.
The Denisovans are known only from DNA extracted from the finger bone of a girl unearthed at a cave in central Siberia. This 40,000-50,000-year-old bone fragment, as well as a rather large tooth from another individual, are all that is known of this species.
The tiny "pinky" bone yielded an entire genome sequence, allowing scientists to compare it to the DNA of modern people in order to better understand the legacy of ancient interbreeding.
Now, researchers have linked an unusual variant of the EPAS1 gene, which is involved in regulating the body's production of haemoglobin - the molecule that carries oxygen in the blood - to the Denisovans. When the body is exposed to the low oxygen levels encountered at high elevations, EPAS1 tells other genes in the body to become active, stimulating a response that includes the production of extra red blood cells.
The unusual variant common among Tibetans probably spread through natural selection after their ancestors moved onto the high-altitude plateau in Asia several thousand years ago.
"We have very clear evidence that this version of the gene came from Denisovans," said principal author co-author Rasmus Nielsen, from the University of California, Berkeley.
He told BBC News: "If you and I go up to high altitude, we'll immediately have various negative physiological effects. We'll be out of breath, we might suffer from altitude sickness.
"After a little while, we'll try to compensate for this by producing more red blood cells. But because we're not adapted to the high altitude environment, our response would be maladaptive - we would produce too many red blood cells.
"The blood becomes too thick and raises our blood pressure, placing us at risk of stroke and pre-eclampsia (in pregnant women)."
But Tibetans are protected against these risks by producing fewer red blood cells at high altitude. This keeps their blood from thickening.
The Tibetan variant of EPAS1 was discovered by Prof Nielsen's team in 2010. But the researchers couldn't explain why it was so different from the DNA sequences found in all other humans today, so they looked to more ancient genome sequences for an answer.
"We compared it to Neanderthals, but we couldn't find a match. Then we compared it to Denisovans and to our surprise there was an almost exact match," he explained.
He says the interbreeding event with Denisovans probably happened very long ago.
"After the Denisovan DNA came into modern humans, it lingered in different Asian populations at low frequencies for a long time," Prof Nielsen said.
"Then, when the ancestors of Tibetans moved to high altitudes, it favoured this genetic variant which then spread to the point where most Tibetans carry it today."
He says it remains unclear whether the Denisovans were also adapted to life at high altitudes. Denisova Cave lies at an elevation of 760m - not particularly high. But it is close to the Altai Mountains which rise above 3,000m.
Prof Nielsen said it was a "clear and direct" example of humans adapting to new environments through genes acquired via interbreeding with other human species.
Previous research has shown that ancient humans introduced genes that may help us cope with viruses outside Africa.
And a study of Eurasian populations showed that Neanderthal DNA is over-represented in parts of the genome involved in making skin, hair and nails - hinting, perhaps, at something advantageous that allowed Homo sapiens to adapt to conditions in Eurasia.
Follow Paul on Twitter.