Indiana Jones might have struggled to cope with snakes, but Coquerel's sifakas evidently know exactly what to do.

One of these Madagascan primates was attacked last year by a large snake called a Madagascar ground boa. But the other members of her troop attacked the snake, eventually hurting it so badly it died.

The incident is described in the journal Primates.

The snake attack was witnessed by four hotel workers in Madagascar on 24 March 2014. They subsequently described what happened to Charlie Gardner of the University of Kent in Canterbury, UK and his colleagues.

The Madagascar ground boa had lived in the area since 2004. It was a female nicknamed "Big George", and was about 2.7m long.

As the staff watched, Big George attacked a female Coquerel's sifaka, one of a group of eight. The snake quickly coiled itself around the sifaka.

At that point the other sifakas launched a counter-attack. They surrounded the snake and began darting in to bite and scratch it, as well as making lots of alarm calls.

This went on for some 20 minutes, until the snake loosened its grip on the female sifaka.

The sifaka then turned and bit the snake on the head, damaging its lower jaw. Unable to properly close its mouth, the snake gave up and retreated into some nearby vegetation.

Victorious, the sifakas gathered round the female and began licking her wounds.

Six months later, the female sifaka gave birth to a single infant. Clearly, the attack hadn't caused her too much harm.

However, Big George wasn't so lucky.

As well as the various bite and scratch marks, she was left with a fractured lower jaw. When staff found her a few days later, her mouth was hanging open.

For the next two months Big George stayed in the same spot on the hotel grounds.

On 20 May she was found dead. The injuries inflicted by the sifakas had proved fatal.

It may seem remarkable that the sifakas would have risked their lives to defend the female from the snake attack. Such behaviour looks, at first glance, selfless.

However, Gardner and his colleagues point out that groups of Coquerel's sifakas are generally made up of closely-related individuals.

This means that a sifaka can preserve at least some of its own genes by saving another member of the group, even if that involves some risk.