Tibetan mastiffs are monstrous dogs that survive high in the mountains, and now we know their ability to thrive in such harsh and low-oxygen environs comes from an extra shot of wolfishness in their genes.

The bulky dogs, which can weigh up to 150 lbs. (70 kilograms), are "renowned for [their] hypoxia tolerance," according to the authors of a new study into these dogs' genes. That means that Tibetan mastiffs can thrive at high altitudes, where the thin air would kill other breeds. And now, according to a paper published July 30 in the journal Molecular Biology and Evolution, we know why: At some point in the past, the dogs interbred with Tibetan wolves, and their descendants inherited gene mutations that code for two amino acids ⁠— small pieces of a protein ⁠— that make Tibetan mastiffs' blood better at capturing and releasing oxygen.

Researchers already knew from previous research that Tibetan mastiffs and wolves shared a pair of mutations not present in other dog species. But this is the first study that shows what the altered amino acids do.

Related: 10 Things You Didn't Know About Dogs

The two tweaks alter the way the dogs and wolves produce hemoglobin, the iron-containing protein in blood that carries oxygen, the researchers showed. They compared hemoglobin from Tibetan mastiffs and Tibetan wolves with hemoglobin from other domestic dogs, and showed that Tibetan mastiffs and wolves have a significant advantage in their ability to absorb and release oxygen under thin-air conditions.

A tibetan wolf. (Image credit: Shutterstock)

"At altitude, the problem is taking in oxygen, because there's just less of it," said Tony Signore, a biologist at the University of Nebraska-Lincoln and one of the authors of the study, in a statement. "If you think of hemoglobin like an oxygen magnet, this magnet's just stronger."

From their genetic studies, it appears that, in the distant past, Tibetan wolves sometimes had these mutations in a stretch of dormant DNA, which didn't code for a protein. At some point, those mutations got copied into an active gene, thereby giving the wolves altered hemoglobin.

Then, as the animals moved into higher-altitude environments, the handful of wolves that had these mutations came to dominate the species, and they became the norm. Later on, the wolves passed on the tweaked gene to Tibetan mastiffs, and those that inherited the altered hemoglobin gene came to dominate the breed.

Originally published on Live Science.