They are man's best friends, and now dogs have surprised researchers by showing that they are capable of advanced reasoning as much as human toddlers.
The study, by Austrian researchers, shows that dogs' behaviour is pretty sophisticated when it comes to a physical problem-solving test.
The study started when researchers first observed how several children aged 14 months reacted during an experiment.
As a part of the experiment, the children were placed separately, and each sat and watched as one by one, their mothers entered a dimly lit room carrying a blanket with both hands, before using their heads to turn on a light switch.
However, instead of copying their mothers' way of switching on the light with their heads, the kids, when they were given a chance to do so, generally used their hands rather than their heads.
The analysts concluded that the toddlers were able to reason that the only reason their mums used their heads, was because their hands were occupied with another task.
Researchers at the University of Vienna then carried out a similar study to see if man's best friend was capable of behaving in the same way.
As a part of this experiment, they trained a female Border collie called Guinness to push a bar with her paws in order to receive a treat, instead of using her mouth as dogs typically do.
Guinness then performed this task while being watched separately by two groups of mixed-breed dogs.
One group of 21 dogs watched her in action when she had a ball in her mouth, while another group of 19-dogs watched Guinness move the bar with her paws while her mouth was empty.
A third group of 14 dogs were not allowed to watch Guinness at all, but were simply let loose on the mechanism without instruction.
Out of the last group, 12 of the 14 dogs operated the bar with their mouths just as the researchers had anticipated.
The second group, the one that had watched Guinness move the bar with her paws while her mouth was empty, was then tested and 83 per cent copied her by using their paws, assuming that doing so was the key to getting the treat.
The last group was then made to perform the task, and the researchers found that out of the 21 dogs in this group, 80 percent of the mutts used their mouths to move the bar, despite the fact that Guinness had used her paw.
The results showed that the dogs had used their mouths because they had concluded that the only reason Guinness used her paws to push the bar was because her mouth was otherwise occupied, just like the toddlers who concluded that their mothers had used their heads to switch on the light because their hands were occupied.
University of Vienna researcher Friederike Range said that this showed that dogs 'imitate selectively'.
'The fact that the dogs imitate selectively depending on the situation has not been shown before. We were very surprised to see this 'selective imitation' by the dogs. They didn't just copy blindly what they saw,' the Daily Mail quoted him, as saying.
Fellow researcher Zsofia Viranyi, of Eotvos University in Budapest, said that the research showed that dogs have a sophisticated thinking.
'The dogs' behaviour was very similar to the children who were tested in the original experiment. Whether they imitate or not depends on the context. It's not automatic, insightless copying. It's more sophisticated,' Viranyi said.
The research is published in U.S. journal Current Biology.