The last ice age was a bad time for wildlife.

The world froze, ecosystems changed, and humans and animals competed fiercely for available resources. By 11,700 years ago, as the ice age drew to a close, most of the large mammals roaming what is now the Yukon Territory in Canada had gone extinct; the large herbivores first, quickly followed by the large predators that relied on them for their own survival.

Gray wolves (Canis lupus) were one of the largest predators to make it through, not just surviving but going on to thrive, their descendants even now skulking through the forests of the Yukon.

New research analyzing their ancient bones may have just revealed how. According to tooth and isotope analyses, the wolves were able to nimbly adapt their diet to shifting prey availability, giving them a survival advantage in a rapidly changing world.

"We can study the change in diet by examining wear patterns on the teeth and chemical traces in the wolf bones," said paleontologist Zoe Landry of Carleton University in Canada.

"These can tell us a lot about how the animal ate, and what the animal was eating throughout its life, up until about a few weeks before it died."

The study was based on the bones and teeth of 48 wolves – 31 ancient beasts that lived between 50,000 and 26,000 years ago, obtained from the Canadian Museum of Nature's Palaeobiology Collection and the Yukon Government Palaeontology Program Collection. These specimens were compared to those from 17 modern wolves, whose skulls had been preserved in the Canadian Museum of Nature's Zoology Collection.

How the teeth of the wolves were worn reveals what they were most likely eating. Scavengers relying on other animals' leftovers would have highly pitted teeth from crunching bones; a diet of fresh flesh, on the other hand, would leave fainter scratches.

This latter was what the researchers found in greater abundance, suggesting it was unlikely that the wolves had to rely on scavenging scraps – they were largely able to hunt their own prey. But what was the prey?

This is where isotope analysis comes in handy. Stable isotopes are taken up into plants from the soil. When these plants are eaten by animals, the isotopes enter teeth and bones and stay there for the rest of the animal's life. In the case of predators, like wolves, the isotopes are obtained when the predator eats the herbivore that ate the plant.

We have isotope profiles – that is, the different proportions of isotopes such as oxygen, carbon, and nitrogen – from various Pleistocene herbivorous species, collected from their bones; it's a bit like a signature, or a fingerprint. Software modeling was used to untangle the proportions of isotopes found in the bones of ancient wolves, and determine which animals they likely ate.

Around 50 percent of their diet, this analysis found, was an extinct species of Pleistocene horse (Equus sp.). The rest was a mixture of muskox (Ovibos moschatus), Dall sheep (Ovis dalli), and reindeer (Rangifer tarandus), with a little bit of woolly mammoth (Mammuthus primigenius).

Wolves in the Yukon today survive primarily on reindeer and moose (genus Alces), which is quite a significant shift in diet. The researchers believe that, while prey animals may have become less numerous at the end of the last ice age, the decline and extinction of other predators may have helped the wolves, opening up new food sources as old ones disappeared.

"The gray wolves showed flexibility in adapting to a changing climate and a shift in habitat from a steppe ecosystem to boreal forest," said paleontologist Danielle Fraser of the Canada Museum of Nature.

"And their survival is closely linked to the survival of prey species that they are able to eat."

This, the researchers said, has important implications for conservation today. Although the wolves are adaptable, they may not continue to be if their food source declines with nothing to replace it. This research shows that both moose and reindeer should be protected, as well as the ecosystem they inhabit in the Canadian Arctic, which is currently under grave threat from climate breakdown.

The research has been published in Palaeogeography, Palaeoclimatology, Palaeoecology.