Amid the harsh, icy lands of ancient Europe, early man found himself an unexpected companion - the snarling, carnivorous wolf - which would eventually become his modern-day counterpart's best furry friend.

New genetic analysis of 148 prehistoric and modern animals has revealed that our present-day pooches, from dingoes to Saint Bernards, are most closely related to either ancient or modern European canines. The comprehensive study points to places like Germany and Switzerland as to where domestication of dogs likely began, and to free-roaming wolves evolving into the Rovers and Spots we know and love today.

The study was published online Thursday in the journal Science.

"The first dogs looked like wolves," said study author and evolutionary biologist Robert K. Wayne of the University of California at Los Angeles. "It took some time before these proto-dogs started to look different."

Wayne and his colleagues estimate domestication occurred around 18,800 to 32,100 years ago, when ice sheets extended over much of Europe's northern lands. Hunter-gatherers feasted on huge kills, such as mammoths. But at the same time, early men looked over their shoulders for predatory cave bears and lions.

So when the friendlier wolves started to hang around for leftover mammoth, perhaps the humans didn't mind because they provided a little extra protection. They began the first step toward domestication by coexisting with wolves in a mutually beneficial relationship, the scientists speculate.

The docile wolves stopped intermingling as much with the wild wolves. After generations upon generations, wolves became more like the dogs of today - still the only large carnivore ever domesticated, said Wayne.