This story originally appeared on Yale Environment 360 and is part of the Climate Desk collaboration.

There are many mysteries in the Amazon. Until recently, one of the most troubling was the vast methane emissions emerging from the rainforest that were observed by satellites but that nobody could find on the ground. Around 20 million tons was simply unaccounted for.

Then Sunitha Pangala, a British postdoc researcher, spent two months traveling the Amazon’s waterways strapping gas-measuring equipment to thousands of trees. She found that trees, especially in the extensive flooded forests, were stimulating methane production in the waterlogged soils and mainlining it into the atmosphere.

Her 2014 expedition plugged a gaping hole in the planet’s methane budget. And she had discovered a hitherto ignored major source of the second most important greenhouse gas in the atmosphere. It now seems that most of the world’s estimated 3 trillion trees emit methane at least some of the time.

Nobody is arguing that trees are therefore bad for climate and should be cut down. Indeed, in most cases, their carbon storage capability easily outweighs their methane emissions. But in a world where corporations plant trees to offset their carbon emissions, we badly need to know if their numbers add up, or if they are undermined by the complex chemistry of trees and methane.

“In the seasonally flooded part of the Amazon, the trees become a massive chimney for pumping out methane,” says one researcher.

Forest scientists have long amused their students by cutting holes in tree bark and setting fire to gases hissing from the trunk. The first recorded measurements were made in 1907, when Francis Bushong of the University of Kansas cut a campus cottonwood and found the gas coming off was 60 percent methane. Yet “it was only about a decade ago that scientists thought to measure whether methane was actually emitting from trees growing in forests,” says Patrick Megonigal of the Smithsonian Environmental Research Center in Maryland, a pioneer in the work.

For a while, few forest researchers wanted to know. They were not keen to hear that trees might not be quite as good for the climate as they hoped. Perhaps they feared a rerun of the furor in 1981, when Ronald Reagan used research on the discovery of volatile organic compounds from trees to falsely claim that they “cause more pollution than automobiles.”

Similarly, climate scientists saw forests as absorbing methane, rather than releasing it. It only slowly dawned on anyone that trees might do both.

Among the first was Vincent Gauci, then at the UK’s Open University and now at Birmingham University. “When I was first working on this, it was poo-pooed,” he says. When Pangala, then also at The Open University, made her first measurements of trees emitting methane in the swamps of Borneo, she had the same experience. Despite finding that the trees increased standard estimates of emissions from the swamps sevenfold, “it took 18 months to get it published,” she says. “We were rejected by several journals. They just weren’t interested.”

But the results kept coming. In 2017, Pangala published the findings from her Amazon expedition, during which she had travelled its tributaries and flooded forests, taking measurements of methane from surface water, floating aquatic plants, soils, and the stems and leaves of almost 2,400 trees in 13 floodplain locations.

“We found a consistent story that the trees all emit a lot of methane,” she says. “In the seasonally flooded part of the Amazon, the trees become a massive chimney for pumping out methane.” Emissions from individual trees were more than 200 times higher than any previously measured anywhere. This was not trivial. Every hectare of flooded forests was emitting several kilograms of methane each day. The on-the-ground findings doubled previous estimates of Amazon methane emissions to around 40 million tons a year. The trees were emitting as much methane as all the tundra ecosystems of the Arctic, whose permafrost contains huge amounts of the gas—a store that is expected to be released in ever-greater quantities as the region warms and its soils thaw.