A long time ago, when early humans and something akin to today's dogs found each other useful, it led to a remarkable marriage between two very different species that must have been made for each other.
In the latest in a series of discoveries showing the extraordinary compatibility of dogs and humans, scientists have found that our brains are wired in a similar way to process the sound of the human voice.
The findings also partly explain why your dog knows you're leaving on a trip before you are sure yourself.
Canines, the research shows, are very good at picking up on emotional cues from the master, which won't come as a shock to anyone who has ever owned a dog.
But what's really surprising about the research is how it was carried out.
Eleven dogs had to be trained to lie motionless, unrestrained, inside a brain scanner for three six-minute sessions while the contraption made clanking noises loud enough to scare Attila the Hun.
That's surprising, because other research shows dogs are especially frightened by loud or unusual noises. The earmuffs worn by the dog probably did not block out all the noise.
The animal has to be unrestrained, because any restraint would make it uneasy and probably eager to leap away while remembering it was not supposed to even twitch its nose. And it could not be drugged to make the experience less frightening, because drugs would distort any findings.
The only thing similar to a restraint is a small strap used to hold the sensors in position atop the dog's head.
The latest findings result from research in Hungary and it is believed to be the first time functional magnetic resonance imaging has been used to study the brain of a non-primate.
"Dogs and humans share a similar social environment," Attila Andics (no relation to the Hun) of MTA-ELTE Comparative Ethology Research Group in Hungary said in releasing the study, published in the journal Current Biology.
"Our findings suggest that they also use similar brain mechanisms to process social information," he said. "This may support the successfulness of vocal communication between the two species."
The findings tell something else about our relationship to our Best Friend. A dog may process the sound of a human voice the same way as we do, but it would much rather hear the voice of a dog than that of a human.
"The left dorsal auditory region (of the dog's brain) responded stronger to dog than to either human or nonvocal sounds," the study notes. "At the very least, our results show that, similarly to primates, conspecific (other members of the same species) vocalizations have a special status in the dog brain."
That may help explain why a normally obedient dog can ignore the master when it hears the bark of another dog.
How did all of this come about? Here is one possible explanation, according to the researchers: As the bond between humans and dogs grew over many generations, the dog brain gradually evolved to be more responsive to the human voice.
But a more likely explanation, according to Andics, is it all began before there were any modern humans, or modern dogs, or even modern wolves. It may date back to a common ancestor of dogs and humans before the "lineages split approximately 90-100 million years ago."
If so, it is likely that many different mammals process auditory information similar to humans, the study suggests, because the evolutionary history of that ability dates back much further than had been thought.