If it weren’t for mountains, our planet might be an orbiting husk. That’s the finding of a new paper in in the journal Nature (paywall), which suggests mountains act as elevators for minerals deep in the earth that may play a crucial role in stabilizing the atmosphere.

Young ranges in particular—like the Himalayas, Rockies, and Andes—bring crucial minerals from the earth’s mantle to the surface. Calcium is abundant in these minerals, and it frequently binds to carbon dioxide in the air and turns into limestone. Rain, snow and wind dissolve the limestone and send it back to the ocean, where it settles.

Louis Derry, a geochemist from New York’s Cornell University (who was unaffiliated with the study) says this process should have sucked the carbon dioxide out of the atmosphere eons ago. Too much CO2 contributes to global warming, but too little would have made the earth a much colder place, preventing life from developing. “If it weren’t for feedback mechanisms, it would only take 5-10 million years to screw things up,” Derry says. Scientists know of some feedback mechanisms that could have slowed the cooling, but these on their own don’t explain our climate’s long-held stability. Even volcanoes, which belch carbon into the air, would not be enough to offset its relentless sequestration into the deep oceans.

The answer, says Mark Torres, the paper’s lead author, is in the stone. Pyrite, or iron sulfide, also known as fool’s gold, is a deep-earth metallic mineral that gets thrust to the surface when mountains rise. When it’s weathered away from the mountain and exposed to oxygen, it releases sulphur dioxide. This is known to crack the bonds carbon forms with other non-organic minerals (like calcium), so that the carbon escapes into the atmosphere as CO2.

However, nobody before thought that mountains could be shedding enough pyrite to stave off a massive carbon deficit.

Torres and his co-authors first suspected that they could on a field trip in South America, when mineral data from the Andes contrasted sharply with that from the Amazonian lowlands. Back in California, Torres found river runoff data for four other young mountain zones that had abundant pyrite. The researchers extrapolated the numbers from the literature to a global sulphur estimate, taken from 65-million-year-old chemical signatures found in marine rocks. Although the area they measured accounts for barely 2% of the globe’s land, their estimates showed that it was the source of 40% of the world’s mineral-derived sulphur.

That was enough to convince them that the forces that churn the earth’s crust into jagged peaks also help our climate stay relatively stable in between catastrophes—such as meteor impacts, solar storms, and industrial revolutions.

Torres admits that the methodology isn’t perfect. Extrapolating data from a single place to an entire planet and an incredible timespan is something of a necessity, because the earth’s chemistry is not something you can easily measure in laboratory-sized chunks.

“You are trying to understand what’s happening all over the world in one value,” says Torres. “The question is, how representative one value is of the whole world and whether that value is accurate over 65 million years.” They believe their evidence is compelling enough to at least convince people who study long-term climate to consider what they’ve discovered as one piece to a puzzle with thousands of unknowns. ”We’re trying to say that this is a potential source for carbon dioxide,” says Torres. “We want people to start thinking about it and including it in their models.”