A new study sheds light on why some wolves evolved into man's best friend - dogs.

A team of international researchers compared the genetic code of domesticated dogs and wolves and found several differences between the two species. One such big difference is the ability of dogs to digest starch.

Earlier studies have suggested two hypotheses for the evolution of dogs from wolves - one is that the wolves were captured by hunter-gatherers who tamed the animals and used them as hunting companions. The other theory suggests that dog domestication began when ancient wolves started to scavenge on leftover food and eventually settled near human settlements.

This new study supports the second hypothesis that dogs evolved from wolves some 11,000 years ago by feeding on food waste dumped by human ancestors.

"This second 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," explained study author Erik Axelsson, from Uppsala University in Sweden.

"So, we think our findings fit well with this theory that the dog evolved on the waste dump," he told BBC.

For their study, Erik and his colleagues compared the DNA sequences of 12 wolves with that of 60 dogs. The dogs belonged to 14 different breeds, ranging from the cocker spaniel to the German shepherd. They found 36 genomic regions in dogs that have probably been modified through domestication, reports Agence France-Presse news agency.

DNA analysis also revealed the presence of two functional categories - genes involved in brain development and starch digestion. More than half of these 36 regions were related to brain function and three genes had a role in starch metabolism, which have successfully helped in the transition from wolf to dog, the AFP report said. Wolves also have genes for starch metabolism, but they don't use them as efficiently as dogs.

The findings of the study are published online in the journal Nature.