It’s easy to understand why early humans domesticated dogs as their new best friends. Tame canines can guard against predators and interlopers, carry supplies, pull sleds and provide warmth during cold nights. But those benefits only come following domestication. Despite more than a century of study, scientists have struggled to understand what triggered the domestication process in the first place. A new theory described today in Scientific Reports posits that hunter-gatherers whose omnivorous digestive system prevented too much protein consumption likely shared surplus meat with wolves. Those scraps may have initiated a step toward domestication.

“This is the first time that we have an ecological explanation for dog domestication,” says lead author Maria Lahtinen, a senior researcher at the Finnish Food Authority and a visiting scholar at the Finnish Museum of Natural History. “I personally don’t think that there is a simple, easy answer behind dog domestication, but we need to see the full picture and complexity of the process.”

Lahtinen did not originally set out to solve a long-standing dog mystery. Instead she was studying the diet of late Pleistocene hunter-gatherers in Arctic and sub-Arctic Eurasia. At that time, around 20,000 to 15,000 years ago, the world was engulfed in the coldest period of the last ice age. In frigid environments then, as today, humans tended to derive the majority of their food from animals. Nutritional deficiencies came from the absence of fat and carbohydrates, not necessarily protein. Indeed, if humans eat too much meat, diarrhea usually ensues. And within weeks, they can develop protein poisoning and even die. “Because we humans are not fully adapted to a carnivorous diet, we simply cannot digest protein very well,” Lahtinen says. “It can be very fatal in a very short period of time.”

During the coldest years of the last ice age—and especially in harsh Arctic and sub-Arctic winters—reindeer, wild horses and other human prey animals would have been eking out an existence, nearly devoid of fat and composed mostly of lean muscle. Using previously published early fossil records, Lahtinen and her colleagues calculated that the game captured by people in the Arctic and sub-Arctic during this time would have provided much more protein than they could have safely consumed.

In more ecologically favorable conditions, wolves and humans would have been competing for the same prey animals. But under the harsh circumstances of the Arctic and sub-Arctic ice age winter, sharing excess meat with canines would have cost people nothing. The descendants of wolves that took advantage of such handouts would have become more docile toward their bipedal benefactors over time, and they likely went on to become the first domesticated dogs. As the authors point out, the theory makes sense not just ecologically but also geographically: the earliest Paleolithic dog discoveries primarily come from areas that were very cold at the time.

The new study presents a “fascinating idea about lean protein being a food that humans would have discarded but wolves may have relied on during winter months in the Arctic,” says Brian Hare, an evolutionary anthropologist at Duke University, who was not involved in the work. “I think it offers another vital clue for how the human-dog partnership might have been initially fueled.”