At geological time scales, what really controls the climate isn’t the atmosphere, it’s the ground. Most of Earth’s carbon dioxide is held underground, in reservoirs of natural gas and oil, but also in the rocks themselves. As the planet’s tectonic platesslide and churn against one another, they bury carbon deep beneath the surface while exposing fresh rock that will soak up more carbon over time.

That carbon can be liberated in large volcanic events, causing mass extinctions. But the process can also work the other way, where rocks pull carbon from the sky. A new study from MIT researchers claims that Earth’s last three major ice ages were caused by collisions of tectonic plates bringing fresh, carbon-hungry rock to the surface. Over millions of years, these rocks sucked up enough carbon dioxide from the atmosphere to cause temperatures to plummet and send glaciers marching outward from the poles.

The process is simple. Much of the rock in Earth’s mantle is composed largely of silicate, and when exposed to the air, it will naturally react with carbon dioxide, forming new minerals that sequester carbon as a solid. This process is much more likely to occur in the tropics where temperatures are higher and frequent rain will wash soils away to expose bare rock.

At certain points in Earth’s history, oceanic tectonic plates in the tropics have collided with continental plates, sliding over the top of them and exposing hundreds of thousands of square miles of fresh rock to the air. These pile-ups, called arc-continent collisions, create a generous supply of fresh rock. Weathering processes begin as they come into contact with air and over the course of a few million years, carbon is gradually drained from the atmosphere.

For their most recent study, published Thursday in Science, the MIT researchers first traced the origins of the Himalayas. Though the forbidding mountain range is far north of the equator today, it actually formed 80 million years ago in more southerly latitudes as the result of a collision between the supercontinent Gondwana and Eurasia. The birth of the Himalayas turned out to have preceded a global ice age by a few million years — a short period of time in geological terms.

The scientists did the same sort of analysis for the remnants of other arc-continent collisions around the world and traced their origins back through time. Ultimately, the researchers found they could tie these geologic events to three major ice ages within the past 540 million years. The Late Ordovician (460 to 440 million years ago), Permo-Carboniferous (335 to 280 million years ago), and the Cenozoic (35 million years ago to today) ice ages were all preceded by tectonic activity that each brought seams of new rock roughly 6,000 miles long to the surface.

The effects were drastic in some cases. The Late Orodovician ice age killed off an estimated 85 percent of all marine species and saw glaciers sweep into North Africa. The Permo-Carboniferous created glaciers that would have spanned a circle encompassing 50 degrees of latitude. The Cenozoic ice age, which we’re still in, is why we currently see ice caps on the poles.

Eventually, the carbon stuck inside the rocks will reach the Earth’s mantle, where it will be liquefied and returned to the surface via volcanic eruptions. The planet has been both far warmer and far cooler than it is now, and the natural cycle of our planet breathing its carbon in and out has been a major force driving those changes.

The difference between the geologic carbon cycle and the warming we see today is, of course, time. It takes millions of years for fresh rock to scrape to the surface and begin absorbing carbon. We’ve warmed the planet noticeably in less than a hundred years. In any case, there’s currently an arc-continent collision going on in Indonesia — it’s likely part of the reason why we’re still technically in an ice age.

Some researchers have proposed that we try and speed the process of rock weathering artificially, by grinding up silicate-containing rocks ourselves and spreading them around. It’s not clear, though, if that process would end up sequestering more carbon than it created. Furthermore, grinding up thousands of square miles of rocks is no easy task.

Ultimately, we can’t rely on the rocks to save us.