At a red-brick factory in the German port city of Hamburg, cocoa bean shells go in one end, and out the other comes an amazing black powder with the potential to counter climate change.
The substance, dubbed biochar, is produced by heating the cocoa husks in an oxygen-free room to 600 degrees Celsius (1,112 Fahrenheit).
The process locks in greenhouse gases and the final product can be used as a fertiliser, or as an ingredient in the production of "green" concrete.
While the biochar industry is still in its infancy, the technology offers a novel way to remove carbon from the Earth's atmosphere, experts say.
According to the UN's Intergovernmental Panel on Climate Change (IPCC), biochar could potentially be used to capture 2.6 billion of the 40 billion tonnes of CO2 currently produced by humanity each year.
But scaling up its use remains a challenge.
"We are reversing the carbon cycle," Peik Stenlund, CEO of Circular Carbon, told AFP at the biochar factory in Hamburg.
The plant, one of the largest in Europe, takes delivery of the used cocoa shells via a network of grey pipes from a neighbouring chocolate factory.
The biochar traps the CO2 contained in the husks -- in a process that could be used for any other plant.
If the cocoa shells were disposed of as normal, the carbon inside the unused byproduct would be released into the atmosphere as it decomposed.
Instead, the carbon is sequestered in the biochar "for centuries", according to David Houben, an environmental scientist at the UniLaSalle institute in France.
One tonne of biochar -- or bio coal -- can stock "the equivalent of 2.5 to three tonnes of CO2", Houben told AFP.
Biochar was already used by indigenous populations in the Americas as a fertiliser before being rediscovered in the 20th century by scientists researching extremely fecund soils in the Amazon basin.
The surprising substance's sponge-like structure boosts crops by increasing the absorption of water and nutrients by the soil.
In Hamburg, the factory is wrapped in the faint smell of chocolate and warmed by the heat given off by the installation's pipework.
The final product is poured into white sacks to be sold to local farmers in granule form.
One of those farmers is Silvio Schmidt, 45, who grows potatoes near Bremen, west of Hamburg. Schmidt hopes the biochar will help "give more nutrients and water" to his sandy soils.
The production process, called pyrolysis, also produces a certain volume of biogas, which is resold to the neighbouring factory. In all, 3,500 tonnes of biochar and "up to 20 megawatt hours" of gas are produced by the plant each year from 10,000 tonnes of cocoa shells.
The production method nonetheless remains difficult to scale up to the level imagined by the IPCC.
"To ensure the system stores more carbon than it produces, everything needs to be done locally, with little or no transport. Otherwise it makes no sense," Houben said.
And not all types of soil are well adapted to biochar. The fertiliser is "more effective in tropical climates", while the raw materials for its production are not available everywhere, Houben said.
The cost can also be prohibitive at "around 1,000 euros ($1,070) a tonne -- that's too much for a farmer", he added.
To make better use of the powerful black powder, Houben said other applications would need to be found. The construction sector, for example, could use biochar in the production of "green" concrete.
But to turn a profit, the biochar business has come up with another idea: selling carbon certificates.
The idea is to sell certificates to companies looking to balance out their carbon emissions by producing a given amount of biochar.
With the inclusion of biochar in the highly regulated European carbon certificates system, "we are seeing strong growth in (the) sector", CEO Stenlund said. His company is looking to open three new sites to produce more biochar in the coming months.
Across Europe, biochar projects have begun to multiply. According to the biochar industry federation, production is set to almost double to 90,000 tonnes this year compared with 2022.