New genetic research has shed light on just when and where dogs became domesticated from wolves— and suggests that it might actually have happened twice.

Indeed, scientists now believe that man’s best friend was domesticated in both East Asia and Europe separately thousands of years ago from different wolf populations, and that as people moved west to Europe, the dogs that came with them eventually commingled with, and partly replaced, the western pooches.

Researchers arrived at this theory by sequencing the DNA of a dog from Ireland that lived about 4,800 years ago. They also analyzed DNA from 59 other dogs that lived between 3,000 and 14,000 years ago, as well as looked at the genetics of modern dogs, and archaeological evidence. That archaeological record indicates that dogs were present in both Europe and Asia over 12,000 years ago.

Most modern dogs are eastern and western mixes. 

Related: Scientists call for ambitious DNA engineering project

“Animal domestication is a rare thing and a lot of evidence is required to overturn the assumption that it happened just once in any species,” Greger Larson, a professor at the University of Oxford’s School of Archaeology and the study’s senior author, said in a statement.

“Our ancient DNA evidence, combined with the archaeological record of early dogs, suggests that we need to reconsider the number of times dogs were domesticated independently,” he said. “Maybe the reason there hasn't yet been a consensus about where dogs were domesticated is because everyone has been a little bit right.”

Related: Sunken American WWII torpedo bomber discovered in Pacific

The study was published in the June 3 issue of the journal Science.

Follow Rob Verger on Twitter: @robverger