When dog owners go through a stressful period, they’re not alone in feeling the pressure — their dogs feel it too, a new study suggests.

Dog owners experiencing long bouts of stress can transfer it to their dogs, scientists report in a study published Thursday in Scientific Reports.

The Swedish researchers focused on 58 people who own border collies or Shetland sheepdogs. They examined hair from the dog owners and their dogs, looking at the concentrations of a hormone called cortisol, a chemical released into the bloodstream and absorbed by hair follicles in response to stress.

Depression, excessive physical exercise and unemployment are just a few examples of stress that can influence the amount of cortisol found in your hair, said Lina Roth of Linkoping University in Sweden.

Roth and her team found that the patterns of cortisol levels in the hair of dog owners closely matched that found in their dogs in both winter and summer months, indicating their stress levels were in sync.

She thinks the owners are influencing the dogs rather than the other way around because several human personality traits appear to affect canine cortisol levels.

The researchers don’t know what causes the synchronization in cortisol levels between humans and their pups. But a hint might lie in the fact that the link is stronger with competitive dogs than in pet pooches.

The bond formed between owner and competitive dogs during training may increase the canines’ emotional reliance on their owners, she said. That in turn could increase the degree of synchronization.

But why do people influence their dogs rather than vice versa? Perhaps people are “a more central part of the dog’s life, whereas we humans also have other social networks,” Roth said in an email.

The study results are no surprise, said Alicia Buttner, director of animal behavior with the Nebraska Humane Society in Omaha.

“New evidence is continually emerging, showing that people and their dogs have incredibly close bonds that resemble the ones that parents share with their children,” she said in an email.

But she said there isn’t enough evidence to assume that the influence goes only one way; it may go both ways.

“It’s not just as simple as owner gets stressed, dog gets stressed,” she said.

Many other factors could affect a person or dog’s stress levels and possibly even dampen them, she said.

Buttner said cortisol levels don’t necessarily indicate “bad” stress. They instead can indicate a good experience like getting ready to go for a walk, she said.

Roth and her team plan to investigate whether other dog breeds will react to their owners the same way.

In the meantime, she offered advice to minimize how much stress dog owners may be causing their pets. Dogs that play more show fewer signs of being stressed, she said.

So “just be with your dog and have fun,” Roth said.