A critically endangered Sumatran elephant who had patrolled Indonesia's jungles to help protect threatened habitats has been killed for his tusks, an official said Monday, sparking a surge of anger online.

Yongki, a tame creature who worked with teams of elephant keepers, was found dead close to the camp where he lived in a national park on the western island of Sumatra, said park official Timbul Batubara.

His one-metre (three-foot) tusks had been hacked off, leaving just bloody stumps, and his legs still bore the chains put on him by his keepers to ensure he stayed in the camp.

There are estimated to be less than 3,000 Sumatran elephants remaining in the wild. They are frequently targeted by poachers for their tusks, which fetch a high price for use in Chinese traditional medicine.

Batubara, from the Bukit Barisan Selatan national park, said it was not yet known how Yongki was killed.

His body, which was found Friday, bore no bullet wounds but he had a blue tongue. Elephants have in the past been poisoned.

Yongki, aged about 35, was well-known among the local "mahouts" or elephant keepers. Nazaruddin, the head of the Indonesian Mahout Forum, said keepers in the area were "very shaken".

"We are mourning the lost of an elephant who has been helping us in handling conflicts and helping forest rangers patrol the forest, and he was a good elephant," Nazaruddin, who goes by one name, told AFP.

The elephant was involved in patrols aimed at reducing tensions, with the tame elephants stopping wild elephants from rampaging through villages. The patrols also help rangers keep a lookout for illegal logging and poaching that threaten Indonesia's vast rain forests.

There was anger on social media after pictures of the elephant's body circulated, with users posting comments on Twitter next to the hashtag #RIPYongki.

"It is time we enforce life sentences for hunters of legally protected animals," said Facebook user Aprilia Putri.

Protection group the International Union for Conservation of Nature classifies the Sumatran elephant as critically endangered. It is one of many species that are under threat in Indonesia.