They proved to be generous — to a point.

The researchers designed an experiment that could provide strong evidence that bonobos could give things to each other simply out of generosity — rather than being pressured into doing so, or expecting some sort of immediate payback.

“Would they do it if there was no benefit to them?” asked Brian Hare, a primatologist at Duke University who helped run the study.

For their experiment, the researchers took advantage of the fact that the Lola Ya Bonobo apes have learned to crack open palm nuts with rocks. Without a rock, they have to gnaw on the nuts for a long time to get them out of their shell.

The scientists put one bonobo in a cage with five nuts. In an adjacent cage, a second bonobo — a stranger to the first one — had two rocks, but no nuts. The cages were connected by a window.

The bonobos were free to bring gifts to the window to give to each other — or to ignore their neighbor.

The researchers found that the bonobos with the nuts proved generous. In 18 percent of the trials, the bonobos with the nuts handed one through the window to their neighbor, a rate that showed their willingness to give food to others.

But the bonobos in the other cage almost never returned the favor. They refused to pass one of their rocks through the window.