Psychology professor and lead author Kiley Hamlin found infants who were as young as nine months old favoured those who brought harm to people who were different than themselves.
She said adults, similarly, tend to like people who harm individuals who are different.
"We wanted to see if we could tell whether infants had that same kind of judgement," said Hamlin in an interview.
"It was shocking how robust the results were."
The study, published in the journal Psychological Science, looked at two groups of infants aged nine months and 14 months and the food they preferred — green beans or graham crackers.
The infants watched a puppet show, with two puppets demonstrating a like for green beans or graham crackers.
More puppets then joined the production, demonstrating nice, neutral or mean behaviour towards the original two puppets.
The study showed that the babies later preferred the puppets who harmed the puppet with the opposite food preferences.
One baby even gave a kiss to the harmful puppet.
The study said the desire to treat badly those with differences was more widespread in the age group of 14-month-old infants, suggesting an increase in bias with age.
Hamlin said almost all of the babies tested acted the same, which was an unexpected result.
"(Babies) like nice puppets really strongly. That's in line with our intuition. Other studies have shown they like punishers if somebody was bad before, but that's also in line with our intuitions.
"If someone's bad they might deserve punishment. This one is not in line with our intuitions."
Also on HuffPost