Young bonobos that are more "socially competent" are more likely to cuddle and calm other apes that are in distress, research has revealed.
Scientists working at an African sanctuary found that bonobos that recovered quickly from an upsetting experience, such as a fight, were also more likely to comfort others.
This mirrors findings from studies in children, and suggests bonobos manage their emotions in a very similar way.
The work is published in PNAS journal.
The researchers captured footage showing "emotionally competent" young apes rushing to hug other juveniles that were screaming after being attacked.
Bonobos are already known as the "empathic apes". Previous studies have documented their responses to others' emotions.
Prof Frans de Waal from Yerkes National Primate Research Center at Emory University in Atlanta, said these new results revealed that their ability to console one another was part of this empathy.
He added: "It's almost as if one first needs to have one's own emotional house in order before one is ready to visit the emotional house of another.
"This is true for children, and apparently also for bonobos."
Prof de Waal's colleague and the lead researcher who gathered footage of these ape interactions was Dr Zanna Clay, also from Emory University.
She explained that the sanctuary, in the Democratic Republic of Congo, provided a natural setting to study emotional behaviour, because the rescued orphan bonobos there behaved very differently from the apes that had been raised by their mothers.
The Olola ya Bonoboo sanctuary is home to many bonobo victims of bushmeat hunting; apes that were taken from their mothers at an early age by hunters.
These youngsters are cared for by humans and, after several years of this rehabilitation, they are transferred into a forested enclosure to join a group of bonobos.
Watching the bonobos, Dr Clay found that rehabilitated orphans had much more difficulty managing their emotions.
After a fight, Dr Clay explained, these orphan apes "would be very upset, screaming for minutes".
"Mother-reared juveniles would recover and snap out of it in seconds," she added.
The findings, the researchers say, indicate that "the way we develop our social and emotional skills and how we deal with the emotional world around us may be shared with that of our closest ape relatives".
Richard Byrne is professor of evolutionary psychology at the University of St Andrews.
He pointed out that the term "consolation" implies that we know about the emotion of the apes and their reasons for intervening, which, he said, "is not part of the observed data".
"But they are our closest relatives, so personally I would argue that the best guess of their emotions is that they'd be the same as our own in a similar situation."