Prehistoric rubbish dumps may have caused the evolution of wolves into dogs, according to a new study.
Scientists have found that domestic dogs have more genes associated with breaking down starch than their relation, the wolf.
One possible explanation is that wolves made a genetic leap as they foraged for food in rudimentary tips created by early farmers.
Being able to better break down starch was "crucial" said the researchers, whose study was published in Nature. They added:
"Our results indicate that novel adaptations allowing the early ancestors of modern dogs to thrive on a diet rich in starch, relative to the carnivorous diet of wolves, constituted a crucial step in the early domestication of dogs."
The heaps of waste may also have brought wolves and humans together, and fostered the close bond which ties man and dog together today. The root of this special relationship between man and his "best friend" is a mystery which has never been explained.
'The dog evolved on the waste dump'
Scientists at Uppsala University in Sweden compared the DNA of 50 dogs with that of 12 wolves. Major differences were found in two areas of the genome, brain development and starch metabolism.
"Wolves also have these genes but they don't use them as efficiently as dogs," said Dr Axelsson.
"When we look at the wolf genome, we only see one copy of the gene [for the amylase enzyme, which breaks down starch] on each chromosome. When we look at the dog genome, we see a range from two to 15 copies, and on average a dog carries seven copies more than the wolf.
"That means the dog is a lot more efficient at making use of the nutrition in starch than the wolf."
Erik Axelsson of Uppsala University, which carried out the study, told BBC: "This hypothesis says that when we settled down, and in conjunction with the development of agriculture, we produced waste dumps around our settlements; and suddenly there was this new food resource, a new niche, for wolves to make use of, and the wolf that was best able to make use of it became the ancestor of the dog.
"So, we think our findings fit well with this theory that the dog evolved on the waste dump."