Bonobos will happily share their food with a stranger, and even give up their own meal — but only if the stranger offers them social interaction, evolutionary anthropologists at Duke Universityreport in the journal PLoS One. The researchers, Jingzhi Tan and Brian Hare, say their findings may shed light on the origins of altruism in humans.

Along with chimpanzees, bonobos are among the closest primates to humans. Chimpanzees, however, do not display similar behavior toward strangers.

“If you only studied chimps you would think that humans evolved this trait of sharing with strangers later,” Mr. Tan said. “But now, given that bonobos do this, one scenario is that the common ancestor of chimps, humans and bonobos had this trait.”

The subjects were all orphaned bonobos at the Lola ya Bonobo sanctuary in the Democratic Republic of Congo. In one phase of the study, bonobos were given a pile of food, then given the opportunity to release a stranger or a group mate (or both) from other rooms.

The bonobos chose to release strangers and share their food. Not only that, but the just-released bonobo would then release the third.

“This was shocking to us because chimpanzees are so xenophobic,” Mr. Tan said. “They won’t approach a stranger unless they outnumber them.”

The apes did have a limit — they would not share their own food when no social interaction was involved.

They were, however, willing to help a stranger get food even without social interaction. Mr. Tan compared this to certain human acts of kindness.

“It’s like when you donate money and you don’t tell people,” he said, “so there’s no way for you to get any benefit.”

A version of this article appears in print on January 8, 2013, on page D3 of the New York edition with the headline: Milk of Human Kindness Also Found in Bonobos. Order Reprints|Today's Paper|Subscribe