LOS ANGELES - Long ago, some brazen wolves started hanging around human settlements, jump-starting events that ultimately led to today's domesticated dogs. Now geneticists say they have identified one of the key changes that turned wolves into the tame, tail-wagging creatures well-suited to living by our sides: the ability to digest carbohydrates with ease.

The report, published online this week by the journal Nature, found signs that dogs can break down starch into sugar, and then transport those sugars from the gut into the bloodstream, more efficiently than can wolves. Comparing dog and wolf DNA, the authors pinpointed several changes in starch and sugar-processing genes that would have made early dogs better able to digest the scraps they scavenged from dumps in early farming villages, helping them to thrive as they gave up the independent life of the pack to entwine their lives with ours.

"That food was obviously the same kind of food that we were eating," most likely a mix of roots, porridge and possibly bread along with bones containing meat and marrow, said study leader Erik Axelsson, an evolutionary geneticist at Uppsala University in Sweden.

No one knows for sure when or where the first dogs came to be, but most evolutionary biologists agree that the wolf probably made the first move and that the draw was the food humans discarded.

The new analysis by Axelsson and his colleagues examined a mix of DNA from 12 gray wolves and compared it with DNA collected from 60 domestic dogs.

The scientists sequenced the dog and wolf DNA and searched for tiny differences between the two. Because they were seeking features that cropped up early in dog evolution, they focused on genetic variations that dogs shared but wolves lacked. They also looked for variations that all, or most, of the dogs had in common.

Taken together, the data fit with the fact that dogs eat more starch than wolves, Axelsson said. He added that this adaptation would have allowed the first dogs to get more goodness out of the waste food they were drawn to at early farming settlements.

Still, domestication may have happened long before humans adopted an agrarian life around 10,000 years ago, said Robert Wayne, an evolutionary biologist at the University of California, Los Angeles, who wasn't involved in the Nature study.

Perhaps dogs evolved through hanging around hunter-gatherers so they could feed on leftover carcasses of the mammoths and mastodons our ancestors killed, Wayne said. In that scenario, the starch-tolerant changes would have cropped up only after dogs were domesticated, just as genetic changes that help break down starch evolved in human beings after we adopted a farming life.

Dr. Oscar Chavez, director of the veterinary technician program at Cal Poly Pomona, said the findings serve as a reminder that dogs don't eat like wolves. He said he and his colleagues are befuddled by the trend toward pricey low-carb dog foods and raw diets, which could stress dogs' kidneys with their extra protein load.