Fido has been with us a long time!
Scientists have long known that the dog was the first animal we domesticated. Previously, it was thought that we domesticated dogs about 10,000 years ago, at the beginning of the Mesolithic period, while humanity was in the process of transitioning from hunter-gatherer communities to agriculture.
However, new evidence pins the split from wolf to dog as happening about 27,000 years ago. This means that we may have begun domesticating dogs as early as 40,000 years ago, because it would have taken a long time for the dog to be bred away from wolves to the extent where it was visible in the fossil record.
This means that dogs may have been domesticated by the Cro-Magnons at the end of the Stone Age, at about the time when Neanderthals were heading to extinction. The upper Paleolithic was a difficult time, and no doubt dogs would have been a huge help in hunting, alarm duty, and protecting camps.