That was at the dawn of agriculture; the two species appear to have been at least acquaintances by then.

“Pretty much everyone without an agenda agrees that we don't really have a good handle about why wolves domesticated into dogs when they did,” said Adam Boyko, a geneticist at Cornell University who studies dog evolution and was not involved in the new research. “But it does seem reasonable, and in agreement with the fossil and genetic record, that it could have predated agriculture somewhat.”

The evidence of natural selection in the number and efficiency of key digestive enzymes supports the hypothesis that dogs may have domesticated themselves as a way to exploit the garbage of permanent human settlements.

“Humans had nothing to do with it,” said Raymond Coppinger, an emeritus professor of biology and expert on dog evolution at Hampshire College in Massachusetts. “There was a new niche that was all of a sudden available for somebody to move into. Dogs are selected to scavenge off people.”

Accompanying the dietary change, and probably evolving along with it, were behavior changes that allowed dogs to tolerate living near people and ultimately being adopted by them.

In the new study, Axelsson and his colleagues examined DNA from 12 wolves and 60 dogs. The wolf samples were from animals from the United States, Sweden, Russia, Canada and several other northern countries. The dogs were from 14 different breeds.

The researchers compared the DNA sequences of the wolves and dogs and identified 36 regions in which the differences were suggestive of recent natural selection in dogs.

In particular, dogs show changes in genes governing three key steps in the digestion of starch.

The first is the breakdown of large carbohydrate molecules into smaller pieces; the second is the chopping of those pieces into sugar molecules; and the third is the absorption of those molecules in the intestine.

“It is such a strong signal that it makes us convinced that being able to digest starch efficiently was crucial to dogs. It must have been something that determined whether you were a successful dog or not,” Axelsson said.