Yawns are contagious, even for dogs.

According to new research from Japan, dogs typically yawn when they see a person yawning -- especially if it’s their owner.

When pet dogs witnessed their owner or a stranger yawn, they imitated their owner’s actions more than the stranger’s. While previous studies have shown that dogs are subject to yawning contagion, the recent study is the first to prove man’s best friend is demonstrating an empathetic response to a human’s emotional state.

“Our study suggests that contagious yawning in dogs is emotionally connected in a way similar to [the way it is in] humans,” study leader Teresa Romero of the University of Tokyo, said in a statement.

Scientists observed 25 dogs and their responses to yawns from their owners and unfamiliar humans. Researchers found that the dogs were more likely to yawn when their owners did. Also, dogs yawned more when a person genuinely yawned vs. when someone imitated a mouth movement.

One possible explanation for dogs yawning is that it's a way to release stress. But the dogs in the study maintained a constant heartbeat, showing that they did not appear to be experiencing any tension, the Telegraph reports.

Thirteen out of 25 dogs yawned during the experiment. Overall, yawning took place an average of once during the yawning part of the experiment and 0.2 times during the part when facial expressions imitated yawning.

In humans, catching someone else’s yawn affects 45 percent to 65 percent of adults. This is normally “associated with activations in neural networks responsible for empathy and social skills,” the researchers wrote in the study.

Humans aren’t alone. Researchers point to chimpanzees, bonobos and baboons as other species that experience contagious yawning.

Scientists were also puzzled that dogs do not respond in the same way to yawns of other dogs. That is, domestic dogs have become attuned to paying closer attention to human social cues than to cues from their own species.