In a famous YouTube video, Tank the dog sure does look guilty when his owner comes home to find trash scattered everywhere, and the trash can lid incriminatingly stuck on Tank's head. But does the dog really know he misbehaved, or is he just trying to look submissive because his owner is yelling at him?

In another new video from the BBC "Frozen Planet" series, Adelie penguins are seen gathering stones to build their nests. One penguin stealthily steals a stone from his neighbor's nest every time the neighbor goes a-gathering. Does the penguin thief know its covert actions are wrong?

These are some of the scenarios that interest ethologists, or scientists who study animal behavior. For years, these scientists categorically ruled out the possibility that animals might have a sense of morality — that they know right from wrong. Lately, though, the tide is turning.

"People used to like to make that stark division between human and nonhuman animals," said ethologist Marc Bekoff. "But there's just no doubt that the scientific evidence for animal morality is accumulating as more and more animals are studied." [6 Amazing Videos of Animal Morality]

Justice for all

Bekoff is a professor emeritus of ecology and evolutionary biology at the University of Colorado, Boulder, and co-founder (with primatologist Jane Goodall) of Ethologists for the Ethical Treatment of Animals. His extensive field research has led him to believe that morality is an evolved trait, rather than a system created by humans, and that it evolved early in the history of mammals.

"It has only been observed in certain species, because it really hasn't been studied extensively, but I would expect that moral sentiments would be fairly widespread among mammals," Bekoff told Life's Little Mysteries, a sister site to LiveScience.

Much of Bekoff's research has focused on wolves and coyotes — both of which live in tight-knit groups governed by strict rules. Bekoff has observed acts of altruism, tolerance, forgiveness, reciprocity and fairness among wolves and coyotes, and says many of these moral sentiments are evident in the way the animals play with one another.

Canids (animals in the dog family) learn social codes of conduct at a young age through play. They first invite one another to roughhouse using a "play bow": They lie down on their forelimbs while standing on their hind legs. Even when this is followed by aggressive actions such as growling and snarling, the bow makes their playful intentions clear. During play, dominant members of the pack will engage in role reversal with weaker ones, rolling over on their backs to give low-status playmates a chance at "winning," as well as lessening the force of their bites to prevent injury. If one playmate accidentally bites another too hard, it "apologizes," play-bowing again to show that it is still playing, despite the slip-up.

Breaking these rules of engagement — or other rules, such as taking more than one's fair share of food — is serious business among wolves and coyotes. "There is a consequence of being labeled a cheater," Bekoff said. Others stop bonding with the "immoral" pack member, and eventually it wanders away from the group, usually resulting in an early death because it no longer receives the benefits of pack living. Bekoff believes the rules governing pack behavior offer a glimpse of the moral code that allowed early human societies to function and flourish.

Dogs evolved from wolves, and seem to have maintained a wolfish sense of fairness. "They do have a sense of right and wrong. You see it when they play at the dog park, for example; when a dog asks another dog to play — even if it is larger and may be dominant — it's going to be honest about it. It knows it would be unfair to ask a dog to play and then beat it up or try to mate with it," he said.

Furthermore, experiments at the University of Vienna have also found that dogs become upset by unfair treatment by humans. When asked to shake hands, the dogs in the study were happy to oblige at first regardless of whether they were given treats or not. But the dogs' enthusiasm for the trick waned when they saw other dogs being rewarded with food after a handshake, but received nothing themselves. The ignored dogs also started showing signs of distress, such as licking or scratching. The researchers argued that these stress signifiers proved the dogs were upset about being treated unfairly — not just sad about missing out on a treat.

Bekoff's book "Wild Justice" (University of Chicago Press, 2009), co-authored with Jessica Pierce, lists evidence of seemingly moral sentiments in many other species too, including whales, ravens, bats, elephants, chimpanzees and even rodents. For example, experiments with rats have shown that they will not eat if they know that doing so will inflict pain on other rats. When the hungry rats were given access to food, but could see that taking it caused a second group of rats to receive an electric shock, the rats stopped eating rather than inflict pain on the group. [Rats Are Ticklish, and Other Weird Animal Facts]

Furthermore, conceptions of wild animals as ruthless and violent are completely wrong, Bekoff said. "All the research coming out these days on other primates and mammals shows that more than 90 to 95 percent of their behavior is pro-social or positive. It's actually rare to see aggression or violence."

Morality in the brain

Another thing that makes gauging morality in animals difficult is that scientists are only just beginning to investigate the neural mechanisms that control moral decision-making in humans. Last year, researchers at the Massachusetts Institute of Technology found that applying a powerful magnet to a part of the brain called the right temporo-parietal junction in human study participants temporarily skewed their ability to make moral judgments. When questioned about the nature of various actions, the magnetic jolt made them think that actions they had previously judged to be immoral were instead morally acceptable. This and related studies suggest that our sense of morality is somehow hard-wired into our brains.

Bekoff suspects that the same brain mechanisms that control moral behavior in humans also control such behavior in other mammals. "It's a new area and what's exciting is that there are so many unanswered questions," he said. "But we need to be consistent in our discussion of behavioral as well as physiological similarities between humans and other animals. As we develop techniques to do imaging in the brains of non-humans, we need to apply the same rules to neuroscience as we do to anatomy."

That is, if the structures in human brains that control moral and emotional behavior are also present in animals, then scientists ought to concede that these structures probably play similar roles for them, just as analogous body parts — eyes, for example — imply that we both see.

Of dogs and penguins

So what of Tank the dog, and the thieving penguin? Ethologists say a sense of right and wrong may be evident in the former animal, but not the latter.

"I do think dogs feel guilt," Bekoff said. Knowing the difference between right and wrong is vital for canids to successfully bond with other pack members, he said — and dogs think their human owners are in their pack.

Nicholas Dodman, an animal behavior scientist at the Cummings School of Veterinary Medicine at Tufts University, also believes dogs are capable of feeling guilty, but isn't sure whether this means they have morality. "Perhaps in the heat of the moment the dog might empty the trash can, and then realize, 'Oh my God, there's this mess around, my owner doesn't like this mess — this is going to be bad news,'" Dodman said. "So yes, they have feelings in many ways similar to our own. But whether you can extrapolate to morals is a different thing."

As for the penguin, Bekoff has observed thieving penguins in the wild, and did not get the sense that they knew stealing stones was wrong. Ravens who steal food, on the other hand, do know they're misbehaving, Bekoff said. The distinction arises from the different way that ravens' and penguins' peers react to the thievery.

"In the raven situation, their social organization depends on treating each other fairly and not stealing, so they punish animals that have stolen food and treat them different from ones that haven't. In the penguin situation, they don't do that. Penguins that steal are not ostracized by their group," he said. Thus there's no moral code of conduct being violated in the case of the penguins, and in the video, the thief steals stealthily not because it thinks its actions are wrong, but rather because that's simply the best way to get its neighbor's stones, he explained.

Animal morality is a tricky business, and more research is needed to discover when and in what forms it exists. That said, "The little we know now about the moral behavior of animals really leads us to conclude that it's much more developed than we previously gave them credit for," Bekoff said. "We are not the sole occupants of the moral arena — and it's unlikely that we would be, given what we know about evolution."

This article was provided by Life's Little Mysteries, a sister site to LiveScience. Follow us on Twitter @llmysteries, then join us on Facebook. Follow Natalie Wolchover on Twitter @nattyover.