Scientists have discovered a jealous side to dogs, something that's only been seen before in animals like monkeys and apes.
Tests were carried out in Austria using pairs of dogs and their owners.
Both dogs would be given a reward of food if they held out their paw for their owner to shake.
But if one dog got a reward, and the other didn't, the dog without food would become unhappy and distressed, and soon stop doing the task.
The dog sees his friend get a reward
In another experiment the dogs were separated and did the tasks on their own. When this happened the dogs continued to shake their owner's hand for much longer, even when they didn't get any reward.
Scientist say this shows that when the dogs are together, they can spot when they are being treated unequally.
This kind of behaviour, where one animal gets frustrated with what is happening with the other, has only been seen before in primates.
Scientists say this may due to the dog's close relationship which humans.