Studies indicate that dogs evolved from a pack of wolves after encountering European hunters and gatherers. They last shared a common ancestor with wolves, approximately 32,000 years ago.
On the other hand, the last time dogs shared a common ancestor was more than 18,000 years ago. This is the period when many dogs were domesticated. They might have assisted human beings to hunt big prey or simply scavenged on leftover carcasses. Since then, their relationship and contact with human beings have grown stronger and they now enjoy domestication status.