There is plenty of evidence to suggest that dogs, in addition to looking adorable in sweaters, possess fairly sophisticated cognitive abilities. They recognize emotion, for example, and respond negatively to antisocial behavior between humans. Man’s best friend can also get pretty tricksy when it comes to scoring snacks. As Brian Owens reports for New Scientist, a recent study found that dogs are capable of using deceptive tactics to get their favorite treats.

The study, published in the journal Animal Cognition, was led by Marianne Heberlein of the Department of Evolutionary Biology and Experimental Studies at the University of Zürich. Heberlein told Owens that the idea for the study was born when she observed her pet pooches engaging in deceptive behavior; one sometimes pretends to see something interesting outside, prompting the other to give up his sleeping spot.

To find out if dogs engage in similar shenanigans with humans, Heberlein and a team of researchers paired 27 dogs with two different partners, Stanley Coren explains in Psychology Today. One of these partners would repeatedly go to the bowl of a given dog, fish out a treat, and give it to the pup. The other would show the treat to the dog, and then put it in her pocket. Perhaps unsurprisingly, the dogs began to show a preference for the more generous partners, and would approach them spontaneously.

Once one partner had been established as cooperative, the other as competitive, the dogs were taught to lead their partners to one of two boxes, both containing food, with the command "Show me the food." And the same pattern was repeated: when the dogs led the cooperative partner to a treat, they got to eat it. The competitive partner withheld the treat.

Researchers then showed the dogs three covered boxes. One contained a sausage, the second contained a less-yummy dry biscuit, and the third was empty. Once again, the process of treat giving and withholding was repeated, but this time with a twist: when the dog was reunited with its owner, the owner asked it to choose one of the boxes. If there was a treat inside the box, the dog was allowed to eat it. But “if the dog chose the box which had been opened before,” Coren explains, “the owner just showed the empty box to the dog.”

Over the course of a two-day testing period, the dogs were repeatedly presented with this conundrum. They had been trained to lead both partners to boxes containing food, but they knew that the competitive partner would not let them eat the snacks. They also knew that if any snacks remained inside the boxes once they were reunited with their owners, they would get a chance to eat them. So the dogs got a little devious.

Researchers observed the pooches leading the cooperative partner to the box containing the sausage more often than expected by chance. They led the competitive partner to the sausage less often than expected by chance. And here’s where things get really interesting: the dogs took the competitive partner to the empty box more frequently than the cooperative partner, suggesting that they were working through their options and engaging in deliberate deception to maximize their chances of getting both treats.

"It is as though the dog is thinking, 'Why should I tell that selfish person where the best treat [is] if it means that I will never get it?'," writes Coren.

“These results show that dogs distinguished between the cooperative and the competitive partner,” the authors of the study write, “and indicate the flexibility of dogs to adjust their behaviour and that they are able to use tactical deception.”

Rest assured, dog lovers: your pooches may be sneaky, but they still love you more than cats.