The battle between cats and dogs goes back millions of years – and it looks like the cats won one of the early rounds.

During the Eocene Era, about 55.8-33.9 million years ago, mammal populations were exploding across the planet. The earliest primates had appeared just a few million years before and at their peak, about 30 different canine species roamed what is now North America. But according to a new study, most of these ancient dogs suddenly disappeared about 20 million years ago. The culprit? Early cats.

“While several groups of carnivores might have competed with dogs, felids [cats] are the groups that shows by far the strongest evidence of competition,” computational biologist and lead author Daniele Silvestro told Katherine Ellen Foley for Quartz via email.

To figure out exactly what caused these ancient canines to go extinct, Silvestro and his team looked at more than 2,000 fossils from all sorts of animals that lived in the same area from about 20-40 million years ago. The researchers compared the body types of carnivores like bears, wolves and big cats to see which animals might have directly competed for food at a time when the planet was undergoing severe climate change. According to Silvestro, ancient cats like the false-sabretooth cat fit the profile perfectly: they were about the same size as the canines, they ate the same food and were thriving and diversifying at the same time as the dogs rapidly disappeared from the fossil record, Foley writes.

Today, there are only about nine different dog species living in North America. Even though the planet’s climate was rapidly changing at the time, it appears that cats were just better predators than their rivals.

"We usually expect climate changes to play an overwhelming role in the evolution of biodiversity,” Silvestro said in a statement. “Instead, competition among different carnivore species proved to be even more important for canids.”

While early cats might have driven many species of early dogs to extinction, it appears that dogs had a leg up in their partnership with early humans. According a recent genetic study, dogs began to separate from wolves about 27,000 years ago, much earlier than was previously believed. On the other hand, the earliest evidence of wildcats living alongside humans only dates back about 9,500 years.