Tibetans largely avoid that problem, and researchers at the University of California, Berkeley, traced the protective version of their EPAS1 gene back to an unexpected source: Denisovans, an extinct relative of modern humans known from a handful of fossils found in Asia.
The Tibetan version of EPAS1 closely matches a Denisovan genome sequenced from a finger bone, far more closely than it matches any other modern population, and it is common in Tibetans but rare or absent elsewhere. The variant keeps red blood cell counts from rising as much at altitude, avoiding the thickened blood that burdens lowland visitors.
The gene most likely entered the Tibetan population through ancient interbreeding between the ancestors of Tibetans and Denisovans, then was favored by natural selection because it made survival at high altitude easier. It is one of the clearest documented cases of a modern human population inheriting a beneficial trait from interbreeding with an extinct relative. Related high-altitude adaptations are still being traced in other mountain-dwelling populations.

Read the original study
Huerta-Sánchez et al., Nature, 2014 · doi.org/10.1038/nature13408
An extinct relative's gene, still at work.
Source
- Huerta-Sánchez, E., Jin, X., Asan, Bianba, Z., Peter, B. M., Vinckenbosch, N., Liang, Y., Yi, X., He, M., Somel, M., Ni, P., Wang, B., Ou, X., Huasang, Luosang, J., Cuo, Z. X. P., Li, K., Gao, G., Yin, Y., . . . Nielsen, R. (2014). Altitude adaptation in Tibetans caused by introgression of Denisovan-like DNA. Nature, 512(7513), 194–7. https://doi.org/10.1038/nature13408