WASHINGTON – You know that dog biscuit shaped like a bone but made mostly of wheat? The fact that your dog is satisfied with it instead of going for a piece of your thigh may be one of the big reasons why its ancestors evolved from wolves to house pets.

A team of Swedish researchers has compared the genomes of wolves and dogs and found that a big difference between the two is a dog’s ability to easily digest starch. On its way from pack-hunting carnivore to fireside companion, dogs learned to love — or at least live on — wheat, rice, barley, corn and potatoes.

As it turns out, that’s also a change that humans underwent as they left the forest, built permanent settlements and began to grow grain.

“I think it is a striking case of co-evolution,” said Erik Axelsson, a geneticist at Uppsala University. “The fact that we shared a similar environment in the last 10,000 years caused a similar adaptation. And the big change in the environment was the development of agriculture.”

The findings, published Wednesday in the journal Nature, support the hypothesis that dogs evolved from wolves who found a new food source in refuse on the outskirts of human settlements. Eventually they came to tolerate human contact and were brought into the household to be guards, workers and companions.

Another theory is that dogs were descended from wolves captured by hunter-gatherers, who tamed and bred them.

Dog evolution is a contentious subject, and the new findings are unlikely to settle the debate. Among the uncertainties is just when some wolves began to evolve into dogs.

Human-tolerantcanidsmay have existed as many as 33,000 years ago. Dogs and human beings sharing the same graves 11,000 years ago. That was at the dawn of agriculture; the two species look 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 Cornell University geneticist who studies dog evolution and was not involved in the new research. “But it does seem reasonable … that it could have predated agriculture somewhat.”