TANJUNG REJO, Indonesia — The loud whir of a chain saw sounds through the forest as a group of farmers gathers around a tree filled with red seed pods. With one slow stroke, a severed knobby branch hits the ground.

“Now it will help the tree grow new fruit,” farmer Tari Santoso says with a smile.

Thousands of cocoa farmers across Indonesia are working with businesses and other organizations to protect their crops from the bitter impacts of climate change and underinvestment that have pushed cocoa prices to record levels.

Cocoa trees are high maintenance: Grown only near the equator, they require a precise combination of steady temperatures, humidity and sunlight. It takes five years for a tree to start producing the seeds that are processed into cocoa used to make chocolate and other foods.

Climate change raises the risks for farmers. Hotter weather hurts yields and longer rainy seasons trigger the spread of fungus and deadly pests. Increasingly unpredictable weather patterns have made it harder for farmers to deal with those challenges.

So farmers are switching to other crops, further reducing cocoa supplies and pushing prices higher. In 2024, prices nearly tripled, reaching about $12,000 per ton, driving up chocolate costs and leading some chocolate makers to try growing cocoa in laboratories.

Indonesia is the third-largest producer of cocoa in the world, behind Ivory Coast and Ghana, according to the United Nations Food and Agriculture Organization.

Sitting in the shade of his forest farm in south Sumatra, 3 miles from a national park where Sumatran tigers and rhinos roam, Santoso is working with Indonesian chocolate maker Krakakoa.

After he began working with the company in 2016, Santoso starting using practices that helped his cocoa trees flourish, regularly pruning and grafting new branches onto older trees to promote growth and prevent the spread of disease. He is using organic fertilizer and has adopted agroforestry techniques, integrating other crops and trees such as bananas, dragon fruit, coffee and pepper, into his farm to foster a healthier ecosystem.

“It wasn’t very successful before we met Krakakoa,” Santoso said. “But then, we received training ... things are much better.”

Krakakoa has trained more than 1,000 cocoa farmers in Indonesia, said founder and CEO Sabrina Mustopo.

Santoso and other farmers in Sumatra said the partnership helped them to form a cooperative, which provides low-interest loans to farmers, with interest paid back into the cooperative rather than to banks outside of the community.

Cocoa farmers who need bigger loans from government-owned banks also benefit from partnering with businesses, as the guaranteed buyer agreements can provide collateral needed to get loans approved, said Armin Hari, a communications manager at the Cocoa Sustainability Partnership, a forum for public-private collaboration for cocoa development in Indonesia.

Dozens of other businesses, the government and nongovernmental organizations and cooperatives are also working with cocoa farmers to better cope with climate change, Hari said. He pointed to a collaboration between Indonesia’s National Research and Innovation Agency and the local division of international chocolate maker Mars, which have released a new variant of cocoa that produces more pods per tree.

Challenges still remain.

Fewer people see cocoa farming as a lucrative business and instead are planting other crops, such as palm oil. And many small-scale farmers still cannot get loans, said Rajendra Aryal, the FAO’s country director for Indonesia.

But Aryal said he hopes that continued collaboration between farmers and others will help. “If we can look at the major issues these (farmers) are facing ... I think this sector could be, again, very attractive to the farmers,” he said.