Dogs aren’t called man’s best friend for nothing. They’re humanity’s oldest friend, and some forty thousand years ago, they played a critical role in helping humanity become the dominant species it is today, according to a leading anthropologist.

In ancient Europe, the Guardian reports, our ancestors were in the midst of an evolutionary battle with our neanderthal cousins, a battle that dogs likely helped us win.

“At that time, modern humans, Neanderthals and wolves were all top predators and competed to kill mammoths and other huge herbivores,” said Professor Pat Shipman of Pennsylvania State University. “But then we formed an alliance with the wolf and that would have been the end for the Neanderthal.”

Image from “The dog book. A popular history of the dog, with practical information as to care and management of house, kennel, and exhibition dogs; and descriptions of all the important breeds” (1906)

This theory may solve one of the most enduring mysteries of humanity’s history — why did the neanderthal species that dominated Europe for as many as 200,000 years die out shortly after humans migrated to the continent from Africa? The previously enduring neanderthals were then extinct within a few thousand years.

Most agree that humans were simply smarter, more accomplished hunters who knew to employ tools to survive and thrive. Shipman agrees with the idea, but adds a new layer with his hypothesis about our early alliance with wolves and dogs.

Shipman explains:

Early wolf-dogs would have tracked and harassed animals like elk and bison and would have hounded them until they tired. Then humans would have killed them with spears or bows and arrows. This meant the dogs did not need to approach these large cornered animals to finish them off – often the most dangerous part of a hunt – while humans didn’t have to expend energy in tracking and wearing down prey. Dogs would have done that. Then we shared the meat. It was a win-win situation. Even if you brought down a bison, within minutes other carnivores would have been lining up to attack you and steal your prey.

Some dogs contain more wolf characteristics than others.

The alliance between humans and wolves allowed the two of them to dominate the food chain at the expense of other, now-extinct species like the neanderthal and the European lion.

The idea is still controversial in the scientific community. Previously, most scientists believed dogs were first domesticated much later when humans first began using agriculture some 10,000 years ago.

Read more at the Guardian.