Editor's note: This story has been updated since it was originally published in October 2015.

The precise place where dogs became man's best friend has been a cloudy and controversial issue in the past. Genetic studies have been less than definitive, with some study results suggesting dogs were first domesticated in Asia, while others pointing to Europe or the Middle East.

Turns out, the answer may be both. A new study published in the journal Science says dogs may have been domesticated twice — once in Asia and once in Europe. Researchers analyzed the DNA of hundreds of dogs and wolves and found they came from two distinct — and geographically separate — wolf populations.

“Maybe the reason there hasn't yet been a consensus about where dogs were domesticated is because everyone has been a little bit right,” Greger Larson of the University of Oxford, the senior author on the paper, said in a statement.

According to Science Magazine:

The data suggest that humans domesticated dogs in Asia more than 14,000 years ago, and that a small subset of these animals eventually migrated west through Eurasia, probably with people. This implies that all modern dogs, as well as the Newgrange canine, can trace their ancestry back to Asia.

Though experts say the full story is not yet clear. In 2015, a genetic study conducted by Cornell University's Dr. Adam Boyko said the first domesticated dogs were likely found in Central Asia, somewhere around Nepal or Mongolia. And in 2010, another study suggested dogs originated in the Middle East.

Why exactly dogs were first domesticated is a matter for speculation, but the leading theory is that dogs and humans first began to interact while both were hunting large mammals. Dogs may have scavenged kills made by hunter-gatherers, and became gradually domesticated over the course of those interactions.