The wolf relatives of modern-day dogs began the evolutionary process of becoming humans’ best friends more than 10,000 years ago. But despite more than a century of research, scientists still do not know the full story of how and why dog domestication occurred in the first place. Now a new study published on Thursday in Scientific Reports reveals genetic changes that may have allowed ancient dogs to feel comfortable around humans by lowering the stress levels the animals experienced in our presence.

“This is the first genetic demonstration that supports the hypothesis that mutations in the stress response system initiated canine domestication,” says the study’s senior author Miho Nagasawa, an animal scientist at Azabu University in Japan.

Nagasawa and her colleagues recruited the owners of 624 dogs to enroll their pets in a study consisting of two behavioral tasks. The researchers categorized the dogs into two groups. One consisted of breeds that are considered to be relatively closely related to wolves, such as Akitas and Siberian huskies. The second was made up of other breeds that are more distantly related to their wild relatives.

For the first task, the pooches had to rely on clues from the researchers—such as the direction of their gaze or a pointed finger—to determine which of two bowls had a treat hidden under it. This task was meant to establish how well the dogs understood human communicative signals. And it built on past findings that even very young domesticated-dog puppies are better at understanding human signals than adult wolves raised by people. In the new study, as would be expected, the researchers found no differences in performance between the groups of ancient and more recent dog breeds.

For the second task, the dogs were presented with an impossible challenge: opening an unopenable container to access delicious-smelling food inside. The researchers measured how much time the frustrated canines spent gazing back at them for help—another behavior that wolves are less adept at than dogs. In this part of the experiment, the scientists did find a significant difference between the groups, with the closer wolf relatives spending less time looking back at the human experimenters for help. The authors interpreted this as showing that the more recent dog breeds have a higher level of social attachment to humans.

After the tasks, the researchers analyzed four genes in their canine subjects to look for differences that might relate to their relationship with humans. Among other things, the team’s analysis included genes involved in producing oxytocin—a hormone associated with social bonding—and cortisol, which is a key stress hormone. The scientists found mutations in a cortisol-producing gene that differed between the recent and ancient dog breed groups. This finding also reflects a previous study that revealed lower cortisol levels in foxes that were selectively bred to be less fearful and less aggressive toward humans.

Given the correlation between changes in the cortisol-producing gene and the more ancient dog group’s lesser social-cognitive abilities, the authors surmise that lower stress levels likely played a role in dog domestication. Being less wary around humans would be a necessary first step for an animal to begin developing the social-cognitive skills needed to better interact and communicate with us.

“Although it is not yet clear whether cortisol, a marker of stress, is actually lower in dogs than in wolves, the fact that two genetic mutations were observed—one of which is accompanied by changes in the production of intracellular cortisol—may provide clues to how the canine tolerance and ability to adapt easily to human society was acquired,” Nagasawa says. She and her colleagues are now conducting follow-up research to check whether cortisol levels actually differ between the two breed groups.

The Scientific Reports study presents “exciting new evidence that dogs’ unusual ability to cooperate and communicate with us evolved as a result of natural selection favoring wolves who could approach and eventually show friendly behavior toward humans,” says Brian Hare, a Duke University evolutionary anthropologist, who was not involved in the study.

But Maria Lahtinen, a visiting scholar at the Finnish Museum of Natural History, who also was not involved in the research, questions whether the new findings necessarily apply to ancient dogs. “The problem in this study is that they have used modern dogs to study the past,” she says. “I would not take this study as an indication of anything from the past but as indicative of how modern dogs behave.”

To get around this challenge, Hare suggests that future investigations could focus on populations of other ancient dog breeds. For example, if the gene identified in the new study did indeed play a significant role in enabling dogs to communicate with humans in a new way, he says, then “it should be that dingoes and New Guinea singing dogs also show the same relationship between their use of human gestures and this genetic candidate.”