In the final hour, they huddled around, studied her face and shook her gently as if to revive her. And when the others had drifted away, one stayed behind to hold her hand.

As death scenes go, it has all the poignancy of human loss, but this was no everyday tragedy. The last breath was drawn before scientists' cameras and represents one of the most extraordinary displays of chimpanzee behaviour ever recorded.

Video footage of the death of Pansy, who at fifty-something was the oldest chimpanzee in the UK, was released by scientists today. The film captures for the first time the complex reactions of our nearest evolutionary cousins to the death of a group member.

Studying the apes' behaviour could tell us as much about ourselves as the attachments and responses to death that chimpanzees exhibit within their groups and families, scientists believe. It could also challenge procedures for dealing with terminally ill animals in captivity.

"Some of these behaviours have never been seen before in chimpanzees. It leads us to ask questions about the evolutionary origins of our own response to death and dying in a member of our own group or family," said Jim Anderson, an expert in the social behaviour of non-human primates at Stirling University in Scotland, who recorded the footage. "Many of our greatest philosophical questions concern death and dying and how we perceive it and deal with it."

Pansy, a female who died of old age at Blair Drummond Safari Park at the end of 2008, was one of four chimpanzees being filmed by Anderson's group. When she became ill, vets paid regular visits to give treatment, while her companions – her daughter, a male and another female – looked on from a distance.

When Pansy lay down in a nest that one of the other apes had made, the rest gathered around her and began grooming and caressing her. Shortly before she died, all three crouched down and inspected her face very closely. They then began to shake her gently. "It is difficult to avoid thinking that they were checking for signs of life," said Anderson.

"After a time, it seemed that the chimpanzees arrived at a collective decision that she had gone. Two left immediately, but one, the other adult female, stayed and held her hand," said Anderson. "That evening, her daughter came back and stayed with her mother all night long. She was trying to sleep, but was clearly very disturbed. All three of them were."

Chimpanzees are rare, even among nonhuman primates, in displaying self-awarness and empathy to other individuals. An animal may only respond to death in an apparently emotional way once these abilities have evolved, Anderson said.

The chimps' behaviour contrasts starkly with accounts of chimps being killed during encounters with other animals in the wild. Typically, groups react to violent deaths by going into a mass frenzy. Anderson, whose research is published in the journal Current Biology, described the behaviour of chimps at Blair Drummond after a death as "serene".

The footage has led him to call into question the wisdom of removing terminally ill animals from their enclosures shortly before they die. "At least in some cases, it might be better for all concerned to allow the animal to die in the comfort of familiar surroundings," he said.

Other extraordinary footage of chimps dealing with death is reported in a second paper in the same journal (see below – some readers may find the video upsetting).

Dora Biro, a researcher at Oxford University, witnessed the deaths of five chimpanzees, including two infants, in a community living in the forests of Bossou in Guinea. The mothers of the two infants, which were killed by a respiratory disease, carried their dead offspring for weeks and months.

During that time the two infant corpses became mummified, but the mothers continued to groom the bodies and carried them to their day and night nests as though there were alive. Over time, the mothers began to allow others in the group to handle the corpses and went longer periods without them.

"Chimpanzees are humans' closest evolutionary relatives, and they have already been shown to resemble us in many of their cognitive functions. They empathise with others, have a sense of fairness, and can cooperate to achieve goals," said Biro. "How they perceive death is a fascinating question and little data exist so far concerning chimpanzees' responses to the passing of familiar or related individuals either in captivity or in the wild."

She added: "Our observations confirm the existence of an extremely powerful bond between mothers and their offspring which can persist, remarkably, even after the death of the infant, and they further call for efforts to elucidate the extent to which chimpanzees understand and are affected by the death of a close relative or group-mate.

"This would both have implications for our understanding of the evolutionary origins of human perceptions of death and provide insights into the way chimpanzees interpret the world around them."