Image copyright Rooobert Bayer Image caption Dogs and wolves displayed a strong sense of inequity when their partners got better treats

The sense of fair play is an important human trait, but new research suggests that it's a key behaviour for dogs and wolves as well.

In tests, if one animal was given a more substantial reward when performing a task, the other one downed tools completely.

It had been felt that this aversion to unfairness was something that dogs had learned from humans.

But the tests with wolves suggest that this predates domestication of dogs.

Scientists have long recognised that what they term a "sensitivity to inequity", or a sense of fairness, played an important role in the evolution of co-operation between humans. Basically, if others treated you badly, you quickly learned to stop working with them.

Researchers believe that the behaviour is also found widely in non-human primates.

Image copyright Rooobert Bayer Image caption Dogs and wolves with higher social status took umbrage faster when sensing unfairness

Experiments in 2008 demonstrated that dogs also had this sensitivity. This new study shows that it's also deeply ingrained in wolves.

The scientists tested similarly raised dogs and wolves that lived in packs. Two animals of each species were placed in adjacent cages, equipped with a buzzer apparatus. When the dog or wolf pressed it with their paw, both animals got a reward on some occasions. Other times, the dog or wolf doing the task got nothing while the partner did.

The key finding was that when the partner got a high value treat, the animal doing the task refused to continue with it.

"When the inequity was greatest they stopped working," said Jennifer Essler, from the University of Veterinary Medicine in Vienna.

"For some of them it was a really really quick and strong response. One of the wolves stopped working after the third trial of not receiving anything while his partner received something. I think he was so frustrated he even broke the apparatus."

The fact that the behaviour was found in both wolves and dogs helps to overturn the idea that dogs learned this concept because they were domesticated.

Image copyright Rooobert Bayer Image caption The researchers believe that a common ancestor to wolves and dogs was a likely source of this behaviour

The experiments suggest instead that the behaviour is likely inherited from a common ancestor to both wolves and dogs.

"It makes much more sense to say that this would be something shared from a common ancestor than to say it evolved twice, or to say that it came from domestication," said Jennifer Essler.

The question of social status or hierarchy also played an important role in the experiments with dogs and wolves of higher rank taking umbrage more quickly.

The human impact on dogs isn't entirely absent though. Pet dogs are less sensitive to being treated unfairly - probably because of their experience with us!

"I think it's clear that this is affected by both domestication as well as their life experience with humans because you do see a difference between pet dogs and pack-living dogs," said Jennifer Essler.

"It seems that having a life experience living with humans makes them more tolerant to inequity that comes from humans."

The study has been published in the journal Current Biology.

Follow Matt on Twitter and on Facebook