PETALING JAYA: Four residents in Riau, Indonesia, are facing the threat of jail-time after admitting to catching and killing three sun bears before cooking them into rendang.

According to a BBC Indonesia report, the four men with the initials CS, GS, E and ZDS had caught the sun bears (Helarctos malayanus) with the use of traps.

ZDS admitted to setting up 50 snares on March 18, 2018 to catch pigs together with his three friends.

When checking the traps 12 days later, they found that one sun bear had been caught.

“I speared it, because it was still alive, and the rest of my friends beat it with wood until it wasn’t moving anymore,” he added.

They set up the snares again and caught two more sun bears on April 1.

The animals were then put into cages before being shot with an airgun.

ZDS admitted he used the spoils to cook bear meat rendang, while his other friends turned the gamey meat into soups and gulai (curry-like sauce).

The bile from the bears' livers was also extracted as traditional medicine for breathing problems.

The men claimed they did not know that sun bears are protected animals both in Indonesia and internationally .

They were arrested after the Riau Natural Resources Conservation Agency learned of the incident through social media.

One of the men had uploaded a video of them skinning the bears and then cooking them on Facebook.

They face up to five years in jail and a fine of 100 million rupiah (RM27,000), under Indonesia’s Conservation of Natural Resources and their Ecosystems (1990) law.

The sun bear is the world's smallest bear species, and lives in South-East Asia’s tropical forests.

However, their population is in decline in Indonesia because of rapid deforestation to make way for oil palm plantations, which has led to habitat loss.