Your dog may not pull you out of a well if you fall down one, but there’s a good chance it will open a door to help you if you are in trouble.

Researchers trying to figure out how much a dog will do to help its owner found that dogs will push open a door to get to their owners — but only if the dog is not too stressed out by the sight and sound of its owner seemingly in distress.

And the dogs seemed to be able to tell the difference between crying and humming. They pushed open a closed door much more quickly if their owners appeared to be crying, the researchers report in the journal Learning & Behavior.

Julia Manor of Ripon College in Wisconsin thought up the trial a few years ago when she was playing with her kids and they buried her in a pile of pillows.

She jokingly called out for help. “My husband didn’t come, but my collie came running down the stairs and dug me out,” Manor told NBC News.

A generation of Americans grew up on the television series "Lassie," which featured a collie who regularly rescued her owner Timmy from various troubles.

“Every dog owner has a story about coming home from a long day, sitting down for a cry and the dog’s right there, licking their face,” said Emily Sanford, who helped conduct the study with Manor while a graduate student at Macalaster College in St. Paul, Minnesota.

“In a way, this is the science behind that.”

The team set up an experiment with 34 dogs and their owners. “We had dogs and their owners come into our lab and we had the owners sit behind a clear plexiglass door. And we told the owner to either cry or to hum,” Sanford said.

The owners also cried out “help” in a flat tone from time to time.

Good boy! The dogs seemed to be able to tell the difference between crying and humming. Julia Manor

“We expected that dogs would try harder to get through the door if the owner was crying than if the owner was humming,” Sanford said.

“And actually that isn't what we found. We found that they opened at the same rate whether the owner was crying or whether the owner was humming. But the interesting thing that we found is that the dogs would open the door significantly more quickly if the owner was crying than if the owner was humming,” added Sanford, who is now at Johns Hopkins University in Baltimore.

The dogs were various breeds, including mongrels, and about half were therapy dogs.

Only half of the dogs pushed open the door to get to their owners, and therapy dogs, to the team’s surprise, were no more likely than untrained dogs to try to open the door.

The team also tested the dogs’ stress, by measuring heart rate.

If the dogs were more stressed, they were less likely to try to push open the door. Sanford thinks that those dogs may have been too upset to act.

"Dogs are most likely to provide help to a human in need if they are able to focus on the human’s need instead of their own personal distress," the researchers concluded.

The owners’ acting ability may have been a factor, as well.

“There was a great degree of variation in the crying and humming abilities of the human participants, where some were significantly more convincing than others,” the team wrote.

Manor will continue the experiments, testing dogs to see if they show empathy for other dogs.

Sanford said the message to dog owners is to take it easy on their pets.

“I think it's really important to keep in mind that dogs are sensitive to our emotional states,” she said.

“So you might think when you're talking to your dog that they don't have any idea what you're talking about," Sanford added.

"But this kind of research tells us that dogs actually do something about the emotions of their humans, which is really exciting if you want to know you have a good emotional bond with your dog. But it also means that you should be careful to make sure that you're treating them well and not exposing them to really negative emotions, because it'll make them feel bad, too.”

Oh, and for the record: In the original Lassie series, Timmy evidently never did fall down a well, so Lassie never ran for help to save him from one.