A chocolate factory nestled deep in the Amazonian jungle in Brazil's northern state of Para offers a sweet antidote to rainforest deforestation.
In many areas of the Amazon, cocoa and other crop production have historically contributed to deforestation as farmers wear out the soil and cut further into virgin forest to obtain fresh land for cultivation.
But cooperatives like the one at Medicilandia on the Trans-Amazonian highway aim to preserve biodiversity by replanting on deforested areas in the shade of the canopy, returning cocoa production to its sustainable roots.
"For decades, the Trans-Amazonian has been synonymous with crimes against the environment. We gave an image of Amazon destruction that we now want to change with this initiative," said cooperative president Ademir Venturim.
The bright-yellow "Cacauway" chocolate factory in Medicilandia takes cocoa from 40 small-time producers in the area.
"For us, the factory is an experiment which can be replicated throughout the Amazon region, by promoting Amazon products," Venturim told AFP.
"By creating jobs and revenue, we are fostering the economic, social and environmental development sought by Rio+20," he said, referring to the June 20-22 UN summit on sustainable development in Rio de Janeiro.
Deforestation will feature strongly at the Rio gathering, which aims to steer the planet toward a greener economy that recognizes the need to protect and restore vital natural resources such as the Amazon rainforest.
Deforestation -- caused by logging, agriculture and development -- in the tropics accounts for up to 20 percent of global emissions of carbon dioxide, making it the second largest driver of global warming after the burning of fossil fuels.
Amazonia, which environmentalists describe as the "Lungs of our planet" because it produces roughly 20 percent of the Earth's oxygen through photosynthesis, accounts for nearly half of those emissions.
Experts are especially alarmed because the impact cuts both ways: climate change threatens to boost the rate at which the Amazon's delicately balanced rain forest dries up, and could push it to a tipping point beyond which recovery would become difficult or impossible.
The UN's Intergovernmental Panel for Climate Change (IPCC) has warned that rising global temperatures could transform much of South America's rain forests into semi-arid savannah-like areas within five decades.
Located in the southwest of Para, one of the Brazilian states hardest hit by deforestation from agriculture and logging interests, the "Cacauway" chocolate plant began small by marketing its products in local shops.
"We have exceeded our expectations," Venturim said.
Cocoa bags carry the name of the individual producer, such as Enivaldo Andrade Pereira.
"The plant is one of the best things that happened to the region," Pereira said, stressing that the prices now paid to cocoa producers here are 50 percent higher than those offered by the country's big chocolate makers.
Pereira's father arrived in the region in the 1970's when the then military regime encouraged farmers to settle the Amazon.
Like many others, he cleared the jungle to make way for grazing land and to plant sugar cane. Later he switched to cocoa.
The area, surrounded by deforested pasture, has been replanted with 12,000 cocoa saplings interspersed with 400 mahogany saplings and other Amazonian tree species.
"Cocoa needs shade and today we are suggesting alternating its production with that of other Amazonian native trees such as mahogany, the Brazil nut or Ipe trees," said Joao Batista, who works for an NGO promoting family farming.
Organic cocoa is also making inroads here as it fetches much higher prices and can be sold on the lucrative international market for high-grade chocolate.
Darcirio Vronski, a pioneer in a cooperative of 23 families who make organic cocoa sold to the Austrian chocolatier Zotter, told AFP that when he switched from sugar cane to cocoa he was harshly criticized by his peers.
"But those who stuck with sugar cane degraded the land while ours remained incredibly fertile," Vronski said proudly.
Para state is one of the major producers of cocoa, a home-grown Amazonian product that is increasingly being seen as a great opportunity for the crucial region's regeneration.
"Before cocoa, farmers were destroying the forest by planting, now degraded areas are regenerated by planting Amazonian products that bring revenue for the producer," said Sebastiao Augusto, a professor at the Federal University of Para.
Large-scale deforestation has made Brazil one of the world's top greenhouse gas emitters, but the government has vowed to curb it and has made significant strides in the past decade.
This week, Brazilian authorities confirmed that deforestation fell to a record low of 6,418 square kilometers (2,478 square miles) last year, down from a peak of 27,000 square kilometers (10,000 square miles) in 2004.
Brazilian President Dilma Rousseff last month vetoed parts of a new forestry code that environmentalists said would have increased deforestation in the Amazon.
Explore further: Coal renaissance is bad news for greenhouse gas mitigation efforts