(CNN) -- Every dog has its day, and scientists are trying to figure out when that first day happened.
At some point in ancient history humans developed close relationships with four-legged creatures that would have otherwise been wild, fierce wolves.
A new study in the journal Science argues that the domestication of dogs happened between 18,800 and 32,100 years ago in Europe. They say European hunter-gatherer cultures were responsible for turning lupine foes into best friends, long before humans developed agriculture.
It's a conclusion that barks up a controversial tree. The study goes against the idea wolves were domesticated when they wandered over to human agricultural settlements, lured by food. The study also contradicts previous research suggesting that dog domestication may have first happened in the Middle East or East Asia.
"There were many aspects in this study that we didn't expect," said Olaf Thalmann, researcher at Finland's University of Turku, who led the study. Chief among the surprises: the European origin of dog domestication.
Digging up bones
Seeking to sniff out when and where domesticated dogs emerged, scientists turned to genetics.
Researchers extracted and sequenced mitochondrial DNA. Mitochondria are structures in cells that convert food energy into usable forms. When working with these ancient samples, scientists focused on mitochondrial DNA because it is more prevalent in cells than DNA within a cell's nucleus.
Scientists recovered DNA fragments from the genomes of 18 prehistoric dog and wolf-like carnivores and 20 modern wolves with origins in Eurasia and America. Researchers compared these mitochondrial genome sequences with those of 49 wolves, 77 modern dogs, 3 Chinese indigenous dogs and 4 coyotes.
By highlighting similarities in DNA sequences among all of these specimens, researchers put together trees of close relationships called "clades." The more similar two creatures' sequences are, the closer together they will be in the clade.
Researchers organized the specimens in the study into four clades, with three of these groups having sister species represented by ancient fossils from Europe, and the fourth relating to modern wolves as well.
It appears, based on these groupings, that the oldest domesticated dogs were in Europe. The carcasses that ancient hunters left behind may have attracted wolves, which could have led to a relationship between dogs and humans, study authors said.
A group called Clade A includes examples of the modern dog breeds Basenji and Dingo, as well as some pre-Colombian New World dogs as old as 8,500 years. The ancient dogs of the Americas seem to have already been domesticated when they got there, having arrived with humans, Thalmann said.
"What we propose is actually the process that led to dog domestication in Europe also gave rise ... (to) dogs in the New World."
Clade A demographically shows a connection with humans. Between 5,000 and 2,500 years ago dog population declined, but then began to rise sharply starting about 2,500 years ago, said Thalmann. Human population size also went up at that time, indicating that dogs were dependent demographically on the human societies, he said. Meanwhile, wolves became more scarce, as agrarian cultures emerged and wolves lost their habitats and wild game.
Surprisingly, researchers did not find a population of modern wolves that might have given rise to modern dogs. In fact, modern dogs have more genetically in common with ancient wolves than the ones we see today.
"It's quite likely that the population of wolves that gave rise to modern dogs does not exist anymore," Thalmann said.
Dogs vs. wolves
Another big surprise from the study is, based on mitochondrial DNA, the two most ancient samples of dog-like creatures included in this study didn't seem to be dogs at all.
One of the oldest samples was previously described in a 2011 study in the journal PLOS One, led by Nikolai Ovodov, a co-author on the new Science study. Ovodov and colleagues described remains of a "dog-like" creature from Razboinichya Cave in Siberia, about 33,000 years old, and found similarities between it and domesticated dogs from Greenland that lived about 1,000 years ago.
But the new study's genetic analysis suggests that this particular sample is an ancient sister lineage to modern dogs and wolves, not a direct ancestor. A 36,000-year-old dog-like carnivore found in Belgium does not seem to represent a direct ancestor either.
"We did not expect that these two particular dogs -- the putative earliest dogs -- that they're not directly related to modern dogs,"
That's not something the study authors expected, Thalmann said.
So what's going on? There are two theories about what happened to these creatures, Thalmann said.
It's possible that both of these fossils represent early attempts of humans to domesticate dog-like animals. These creatures did not appear to leave any descendents, so they may signify a failure of domestication.
Alternatively, these creatures may not have been domesticated at all, but rather unusual wolves that died out before the last Ice Age.
More recent specimens -- such as a 14,700-year-old fossil from the Oberkassel site in Bonn, Germany, and the 12,500-year-old fossil from Germany's Karstein cave -- seem to be more directly related to modern dogs. Scientists previously had evidence based on their physical features, but the new mitochondrial genome analysis adds more support, Thalmann said.
By 14,000 years ago, "dogs had become a consistent component of human settlements and were subject to deliberate burial themselves and were included in human graves," the PLOS One study said.
On the scent of other theories
This new study doesn't present the whole story, however. It did not include ancient samples from the Middle East or China, which are alternative proposals for the origins of dog domestication. Thalmann anticipates that this will be a criticism of the study. Also, regarding wolves, the study included fewer wolf samples from the Middle East and East Asia than other areas, potentially skewing that part of the analysis as well.
But, notes the study's senior author Robert Wayne, a biologist at the University of California, Los Angeles, the oldest dog fossils from East Asia are no more than 8,000 years old, making them much younger than the European samples and dating from well after the domestication of dogs. The oldest Middle Eastern dog remains are between 10,000 and 12,000 years old, and so still more recent than the European fossils.
Mitochondrial DNA from ancient canines from these areas would make for a more complete picture of canine evolution, but it was not available in this study.
If a 20,000-year-old dog fossil were available from these areas, scientists would also need to find other fossils to arrange them in a tree of relationships, Thalmann said.
If those were genetically more closely related to modern dogs than the European samples, that would argue for a different origin of domestication -- but such samples have not been recovered. This result seems unlikely, given the close associations found between modern dogs and ancient European wolves and dogs, Wayne said.
Many questions remain about the first domesticated canines. They may be dog-gone, but science is making sure they're not forgotten.