By Helen Briggs
BBC News science reporter
Infants as young as 18 months show altruistic behaviour, suggesting humans have a natural tendency to be helpful, German researchers have discovered.
In experiments reported in the journal Science, toddlers helped strangers complete tasks such as stacking books.
Young chimps did the same, providing the first direct evidence of altruism in non-human primates.
Altruism may have evolved six million years ago in the common ancestor of chimps and humans, the study suggests.
Scientists have long debated what leads people to "act out of the goodness of their hearts" by helping non-relatives regardless of any benefits for themselves.
Human society depends on people being able to collaborate with others - donating to charity, paying taxes and so on - and many scientists have argued that altruism is a uniquely human function, hard-wired into our brains.
The latest study suggests it is a strong human trait, perhaps present more than six million years ago in the common ancestor of chimpanzees and humans.
"This is the first experiment showing altruistic helping towards goals in any non-human primate," said Felix Warneken, a psychologist at the Max Planck Institute for Evolutionary Anthropology in Leipzig, Germany.
"It's been claimed chimpanzees act mainly for their own ends; but in our experiment, there was no reward and they still helped."
Dr Warneken and colleague Professor Michael Tomasello wanted to see whether very young children who had not yet learned social skills were willing to help strangers.
The experimenters performed simple tasks like dropping a clothes peg out of reach while hanging clothes on a line, or mis-stacking a pile of books.
Our closest living relative, the chimp, also shows rudimentary helping behaviour
Nearly all of the group of 24 18-month-olds helped by picking up the peg or the book, usually in the first 10 seconds of the experiment.
They only did this if they believed the researcher needed the object to complete the task - if it was thrown on the ground deliberately, they didn't pick it up.
"The results were astonishing because these children are so young - they still wear diapers and are barely able to use language, but they already show helping behaviour," said Felix Warneken.
The pair went on to investigate more complicated tasks, such as retrieving an object from a box with a flap.
When the scientists accidentally dropped a spoon inside, and pretended they did not know about the flap, the children helped retrieve it. They only did this if they believed the spoon had not been dropped deliberately.
The tasks were repeated with three young chimpanzees that had been raised in captivity. The chimps did not help in more complex tasks such as the box experiment, but did assist the human looking after them in simple tasks such as reaching for a lost object.
"Children and chimpanzees are both willing to help, but they appear to differ in their ability to interpret the other's need for help in different situations," the two researchers write in Science.
Further evidence of chimps' ability to cooperate was revealed in a separate study published in the same edition of the scientific journal.
Alicia Melis, at the Ngamba Island Chimpanzee Sanctuary in Uganda, found that chimps recognised when collaboration was necessary and chose the best partner to work with.
The chimps had to cooperate in reaching a food tray by pulling two ends of a rope at the same time.
"We've never seen this level of understanding during cooperation in any other animals except humans," she said.
But she said there was still no evidence that chimpanzees communicated with each other about a common goal like children do from an early age.