MONTAGNE: But the gray wolf is the ancestor of all domesticated dogs, including that Jack Russell terrier we just heard. Just how wolves came to live with people isn't really known. But as NPR's Veronique LaCapra reports, a new study suggests that food may have played a role.

VERONIQUE LACAPRA, BYLINE: Most dogs will eat just about anything.

(SOUNDBITE OF DOG EATING)

LACAPRA: That's my dog, Sophie, chowing down on some kibble. But what she really loves are pizza crusts.

(SOUNDBITE OF DOG EATING)

LACAPRA: My old dog loved french fries. And my dad's dogs prefer bits of flour tortilla. But dogs didn't always have such eclectic palates. They evolved from wolves, and wolves pretty much only eat meat. Somewhere along the line, Sophie's ancestors acquired a taste for starchy food.

Now, dog food wasn't on Erik Axelsson's mind when he started looking for genetic differences between dogs and wolves. He's an evolutionary biologist at Uppsala University, in Sweden. Axelsson found changes in genes related to the nervous system, but he also noticed something else.

ERIK AXELSSON: Three key genes involved in the digestion of starch also look differently in dogs and wolves.

LACAPRA: He says he expected to find differences in nervous system genes since dogs behave very differently from wolves. But the ability to digest starch?

AXELSSON: That was surprising. I mean, no one's really been hypothesizing about any such changes. On the other hand, it makes sense.

LACAPRA: It makes sense because some researchers, including Axelsson, speculate that wolves first became domesticated when people settled down and started farming. The hungry wolves would have been attracted by their garbage dumps full of food scraps. But Axelsson says to take advantage of this convenient, new food supply, the wolves would have had to adapt not just to being near people, but also to eating their food, which now included starchy grains and vegetables.

AXELSSON: It was also very important to actually be able to have the digestive system that could allow you to make efficient use of the food that was available.

LACAPRA: So any wolves who could digest starch would have had an advantage. Axelsson thinks today's domesticated dogs are probably descended from them. His comparison of the wolf and dog starch genes is published this week, in the journal "Nature."

ROBERT WAYNE: That's a fascinating result.

LACAPRA: Robert Wayne is an evolutionary biologist at UCLA. He has very different ideas about how and when dogs became domesticated. But he says starch digestion is an important new piece of the story. Wayne believes dogs and people got together more than 30,000 years ago - when we were still hunting, not farming. He says it could have been the leftover animal carcasses that drew wolves to humans. Then, when farming started, it wasn't just dogs that had to deal with a more starchy diet.

WAYNE: Humans might have likewise adapted to such carbohydrate-rich diets, after they transitioned from more of a meat-eating diet.

LACAPRA: In other words, dogs and humans would have undergone similar genetic changes at around the same time. Erik Axelsson says this is a really striking example of parallel evolution.

AXELSSON: Both dogs and humans have adapted to a similar environment, and that environment was probably created by the development of agriculture.

LACAPRA: Axelsson says because dog and human history is so closely tied together, there may be other examples of our adapting in similar ways. This makes him think that studying dog genetics could provide insights into human physiology and disease.