TRIPA PEAT SWAMP, Indonesia (AP) — The Tripa peat forest has been called the orangutan capital of the world, but its great apes are under threat by palm oil plantations gobbling up thousands of acres of native vegetation to instead grow the trees that produce the most consumed vegetable oil on the planet.

Palm oil is used in everything from cookies and lipstick to paint, shampoo and instant noodles, and Indonesia is the world's top producer. As demand soars, plantations are expanding. In Tripa, companies drain the swamp, releasing planet-warming carbon into the atmosphere and clear the forest of its native trees, often setting illegal fires.

Orangutan examined (AP Photo/Binsar Bakkara)

This robs orangutans and other endangered species of their habitats, leaving the animals marooned on small swaths of forest, boxed-in on all sides by plantations. They starve or they are killed by plantation workers when they emerge from the jungle in search of food. Mothers often die protecting their babies, which are taken and sold as illegal pets.

Orangutan relocated (AP Photo/Binsar Bakkara)

On Aug. 10, a rescue team from the Sumatran Orangutan Conservation Program, accompanied by the Indonesia's Nature Conservation Agency, hiked into the Tripa peatlands to look for a mother and baby orangutan that had been reported in an area being overtaken by oil palms. The plan was to sedate and relocate them, but when the team arrived, there was no sign of the duo. Instead, they encountered a 50-kilogram (110-pound) male orangutan that was about 20 years old. He too was suffering, and the team managed to tranquilize him and carry him out of the jungle in a stretcher net.

A tranquilized orangutan (AP Photo/Binsar Bakkara)

He was named "Black," and driven about eight hours to an orangutan reintroduction center in Jantho, Aceh Besar. He joined about 100 other primates that have been released in the jungle to establish a new wild population. Only an estimated 6,600 critically endangered Sumatran orangutans remain. Less than 200 are believed to be living in the Tripa swamp, but it is still one of the densest concentrations of orangutans. The great apes are only found on two islands, Indonesia's Sumatra and Borneo, which Indonesia shares with Malaysia. Both support separate species.

A conservationist (AP Photo/Binsar Bakkara)

"Capturing wild orangutans is not something we like to do. It is difficult, highly stressful and risky for all concerned," said the rescue group's director, Ian Singleton, who has been studying Sumatran orangutans since the 1990s. "It really is a last resort, and a reflection of the dire situation many of these animals are in as a result of the ongoing destruction of their habitat."

Orangutan before relocation (AP Photo/Binsar Bakkara)

The Tripa peat swamp is part of the 2.6 million hectare (6.4 million acre) Leuser Ecosystem in northern Sumatra, which is the last place on earth where orangutans, tigers, elephants and rhinos live together in the wild. The entire area is also under threat from logging, pulp and paper plantations and mining. In 2012, huge fires that were intentionally set to clear the land for palm oil ripped through the swamp, killing wildlife and blanketing surrounding areas in a thick haze.

An orangutan is relocated (AP Photo/Binsar Bakkara)

The Indonesian government filed a lawsuit against palm oil firm P.T. Kallista Alam in 2012 for illegally burning 1,000 hectares (2,470 acres) of the Tripa swamp. Three years later, it was ordered to pay $26 million in fines and reparation. A manager was sentenced to three years in prison. However, the company filed a lawsuit against the government in July and so far no fines have been paid and no prison time has been served.

Orangutan before it is rescued and relocated (AP Photo/Binsar Bakkara)