So how did the scientists find this out?
They studied chimpanzees and bonobos living at two great ape sanctuaries.
The scientists designed an experiment to be like natural feeding in the wild using peanuts.
The apes were observed during the five minutes before the peanuts arrived, when they knew food was coming.
Researchers recorded when the apes would give reassuring physical contact, like touching, hugging or kissing.
The team found that those who touched and hugged were more likely to get the food and eat alongside each other peacefully.
Dr Jake Brooker explained:
“Comparing bonobos and chimpanzees – our two closest relatives – offers fascinating insight into the evolutionary roots of social behaviour and how they, and we, manage tension, competition and cooperation”.