A rescue operation Monday in Indonesia saved a group of men trapped in trees by several Sumatran tigers that kept them surrounded for five days.

Five men were rescued Monday after wildlife tamers were able to drive the tigers away, although a sixth man was mauled to death by one of the tigers before he could be rescued.

The incident took place in the protected Mount Leuser National Park in Tamiang in the north of Indonesia's western Sumatra Island. The sprawling park covers nearly 3,060 square miles (7,930 sq km) along the border of North Sumatra and Aceh provinces.

Tigers reportedly attacked the men as they were foraging the forest for rare agarwood, the aromatic resin of which is used to make incense and perfume.

A trap the men used to capture a deer to eat accidentally caught a tiger cub instead, which caused five other tigers in the area to attack the men, according to district police chief Lt. Col. Dicky Sondani, who was quoted by the New York Post.

Word of the situation spread as the men took to the trees and used their mobile phones to send messages to nearby villages for help. The men were so deep in the jungle that it took rescuers three days to reach them.

Rescuers were worried that the men would grow weak and fall from the trees due to lack of food. Drinking rainwater allowed the men to survive for five days, though one member of the group, a 28-year-old identified as David, was killed when the tree branch he climbed broke and he fell to the ground where the tigers laid in wait.

There were reportedly seven tigers wandering around the base of the trees, but four of them left before rescuers arrived.

Sumatran tigers are the smallest of all the tigers the most critically endangered tiger subspecies. Only found on the Indonesian island, about 350 of the Sumatran tigers remain in the wild, where their numbers have diminished before of forest destruction and poaching.

It was unclear what became of the tiger cub caught in the trap.