
The relationship between human and canine has deep roots. Converging archaeological and genetic evidence indicate a time of domestication in the late Upper Paleolithic close to the Pleistocene/Holocene boundary, between 17,000 and 14,000 years ago. Fossil bone morphologies and genetic analysis of current and ancient dog and wolf populations have not yet been able to conclusively determine whether all dogs descend from a single domestication event, or whether dogs were domesticated independently in more than one location. Domesticated dogs may have interbred with local populations of wild wolves on several occasions (a process known in genetics as introgression).
This set up a selective breeding situation that resulted in a strain of wolves having shorter and shorter flight distances, until they were eventually comfortable near humans, having domesticated themselves, so to speak. At that point, they were tolerated by humans, so long as they were also useful, in such ways as catching rats or driving away other predators. In time, other uses, such as hunting, were found for them. The Farm Fox Experiment Evolution of Dogs