Tibetan mastiffs thrive where most dogs and people can’t: in the thin, frigid mountain air above 4000 meters. A new study suggests they acquired this talent by interbreeding with gray wolves that already ranged to such heights more than 20,000 years ago. Intriguingly, Tibetan people received their high-altitude fitness via the same mechanism—by interbreeding with now extinct humans known as Denisovans. The study adds to growing evidence that such ancient mating events have sometimes played a vital role in the adaptation of modern species to their environments, the scientists say.

“It’s a very cool discovery … which turns out to be a mirror of what’s going on with the humans [there],” says Elaine Ostrander, a geneticist at the National Institutes of Health in Bethesda, Maryland, who was not involved with the study.

An early type of dog from China’s lowland regions likely traveled to the Tibetan Plateau with people about 24,000 years ago, says study author Zhen Wang, a geneticist at the Shanghai Institutes for Biological Sciences in China. And like those humans, the lowland dogs “adapted in a relatively short time” to the high life, ultimately becoming today’s shaggy, large-boned mastiffs. During that transition, they acquired various traits that helped them endure the harsh, icy winters and limited supply of oxygen.

Previous research showed that the mastiffs, just like modern Tibetans, have adapted to the latter challenge by producing less hemoglobin, the protein that carries oxygen in red blood cells. This helps them avoid the clots and strokes that can arise when the body produces additional red blood cells in an effort to acquire more oxygen at high altitude, scientists believe. Other biologists have identified the genes in the mastiffs responsible for this adaptation, most importantly one called EPAS1, which regulates the production of hemoglobin.

A variant of this very same gene is key to the Tibetan people's ability to survive at altitude. They acquired it from the Denisovans, who had lived in Siberia and apparently across Asia more than 100,000 years ago. But where had the mastiffs’ special EPAS1 come from?

Wang and his colleagues suspected that gray wolves were the source because they had a long history on the plateau, and also had a variant of the EPAS1 gene. The scientists tested their hunch by analyzing segments of DNA containing that gene from 29 canids, including highland and lowland gray wolves from China, Tibetan mastiffs, Chinese lowland village dogs, and a golden jackal. They found that Tibetan mastiffs are much more closely related to other Chinese dogs than they are to gray wolves. They also discovered two genetic areas in the mastiffs—but not in the other dogs—that had all the signs of having been acquired by interbreeding with the Tibetan gray wolf. These included regions encompassing the EPAS1 gene, as well as a gene called HBB, which has also been found in other animals adapted to living at high altitude.

To find out when the mastiffs and Tibetan wolves interbred, the scientists constructed an evolutionary tree for a region of each canid’s EPAS1 gene. Calculations revealed that mastiffs and wolves likely mated about 24,000 years ago, coinciding with the time of arrival of modern Tibetans, the scientists report today in Molecular Biology and Evolution . That date is apt to be controversial, because another recent analysis concluded that dogs were only domesticated about 16,000 years ago. But the Tibetan mastiff “is one of the most ancient Chinese dog breeds,” Wang says.

“It’s surprising and provocative that this [interbreeding] strategy has been employed by both species,” humans and dogs, says Frank Lee, a molecular biologist at the University of Pennsylvania who was not involved with the study. Indeed, such interbreeding between species has turned out to be unexpectedly common in other species, too.

As far as gray wolves, there’s no genetic evidence that they got anything beneficial out of the deal, Ostrander notes. The same may be true for our Denisovan cousins. We’re still around, after all, and they’re not.