Related

When your preschooler declares, “That’s not fair!” after her brother receives an imperceptibly larger piece of cake, she’s not just being selfish. Kids have a keen sense of fairness, a characteristic that research increasingly shows is an innate part of human morality. Indeed, the latest study, published in Psychological Science, finds that even babies are disturbed by displays of injustice — and even when it doesn’t apply to them.

“We found that 19- and 21-month-old infants have a general expectation of fairness, and they can apply it appropriately to different situations,” said study co-author Stephanie Sloane, a graduate student at the University of Illinois, in a statement.

In the first set of experiments, 48 babies aged 19 months were tested individually as they sat on their mothers’ laps. The infants watched a live scenario of two giraffe puppets dancing next to each other on a small stage. Suddenly, an experimenter appeared through a window at one side of the stage, saying “I have toys!” Both giraffes exclaimed, “Yay, yay!”

In some versions, the experimenter, who had two toys, gave one toy to each giraffe. In other scenarios, the experimenter gave both toys to only one giraffe. Both puppets then looked down at the toys and paused. (Another version of the same experiment used cookies instead of toys.)

The researchers then measured the amount of time toddlers gazed at the scene before turning away. Prior studies have shown that babies reliably pay attention longer to things that surprise them or violate their expectations. In the giraffe experiment, toddlers stared at the scene much longer after the pause when the second giraffe didn’t get a share of the goodies.

“We think children are born with a skeleton of general expectations about fairness,” Sloane said, “and these principles and concepts get shaped in different ways depending on the culture and the environment they’re brought up in.”

In a second experiment, 21-month-olds watched as two adults sat facing each other with a pile of toys between them. Another researcher came in and said that the toys needed to be put away and that the adults would get stickers if they cleaned them up.

In one scenario, one of the adults sat around and continued to play while the other one put all the toys back in boxes; in another version both adults worked at putting the toys away. In either case, the adults were rewarded equally with stickers.

Once again, the toddlers were surprised when both the slacker and the diligent worker both got stickers. Here, the babies seemed to expect that equal work would result in equal pay.

Such findings aren’t limited to humans. Dogs have been shown to become less responsive to commands when they see another dog get a greater reward for doing the same trick — and these are animals that will normally do tricks eagerly, without even requiring food rewards. Over time, they’ll stop responding at all if they continue to see unfair treatment.

Capuchin monkeys behave similarly. If they see a fellow monkey receiving a better treat, they’ll reject food that they had previously accepted happily. In experiments, capuchins have also been shown to share food with other monkeys, if they had to collaborate to get to it — even in situations where it’s possible for the monkey who gets first access to the food to keep it easily for itself.

The findings suggest that some ability of perceive fairness is fundamental to the cooperation that allows social species to exist. Without a way to keep track of those who do their fare share or to punish or exclude those who shirk work or fail to share, selfish actions would ultimately drive out cooperation and social groups would fall apart.

In humans, of course, the dance between cooperation and competition — and the notion of what is truly fair — is far more complicated. Other research looking at how cooperation develops in children shows an interesting connection between self-control and the ability to behave fairly toward others.

When preschool children watch candy being distributed to others, they prefer that everybody get an equal share. Yet when they are given the chance to divvy up candy themselves, they tend to act selfishly and object only when they are the ones who end up with a smaller share. But a study published in PLoS One in October found that even 15-month-olds will sometimes share nicely — and that the children who are ready to do so are those who are most sensitive to displays of unequal distribution among others. This suggests that while most children want fairness in general, some have yet to develop the self-control that would allow them to follow through when it applies to them.

Parents should take heed of these results and be careful not to label children as “selfish” simply because they haven’t yet developed the capacity to act on their innate sense of fairness. Although it can be exasperating to try to attend to each child’s demands for equal treatment, remember that a child’s sense that something is “unfair to me” may be the first step toward having a sense that something is unfair all around. And believing that people should be treated equitably is the foundation for justice.

A sense of fairness also seems to be linked with happiness on a societal level: research shows that countries that have less social inequality have greater levels of happiness and longer life expectancies than societies in which there is a greater gap between rich and poor.

Maybe the adults can learn something from the toddlers here.

Maia Szalavitz is a health writer at TIME.com. Find her on Twitter at @maiasz. You can also continue the discussion on TIME Healthland’s Facebook page and on Twitter at @TIMEHealthland.