At sites across the midsection of Mars, scientists have found layers of water ice buried mere feet beneath the red planet’s surface. The discovery adds crucial detail to Mars’s geologic history, and it may shape how future humans on Mars get their water.

"This is a new window into ground ice on Mars," says Colin Dundas, the U.S. Geological Survey geologist who co-discovered the ice layers.

Scientists have long theorized that reserves of water ice are locked underground on Mars. In 2002, the NASA Odyssey mission scanned the planet from orbit and detected signs of shallow ground ice at high latitudes. In 2008, the NASA Phoenix mission dug up water ice at its landing site near the Martian north pole.

Mars 101 Mars, the fourth planet from the sun, has been a source of intrigue throughout human history. Recent NASA exploratory expeditions revealed some of the planet's biggest mysteries. This video explains what makes Mars so different from Earth and what would happen if humans lived there.

And in late 2016, scientists using the Mars Reconnaissance Orbiter (MRO) found a buried ice sheet at Mars’s mid-latitudes that holds about as much water as Lake Superior. But until Dundas’s study, published today in Science, scientists struggled to understand the extent and accessibility of Mars’s subsurface ice layers.

The eight sites featured in the new study include steep banks where, much like cutting into a cake, erosion has exposed layers of rock and ice that MRO could see from overhead. The bands of ice first appear between three and six feet underground, supporting the notion that Mars’s mid-latitudes periodically saw large snowfalls millions of years ago, when Mars was tilted on its axis at a steeper angle than it is today, says Dundas.

"[They are] very cool images that capture the subsurface ice predicted by theory," says Caltech planetary scientist Bethany Ehlmann, who wasn’t involved with the study. "Also, we may be able to core the ice for a record of climate change on recent Mars, much like we do on Earth."

The discovery could also influence how future astronauts—who may one day land in Mars’s mid-latitudes—slake their thirst.

Human missions to Mars would likely rely on extracting water from the local environment, either baking it out of hydrated minerals or mining it from ice deposits. Humans would then drink the water or break it down into hydrogen and oxygen, which could then be used to make breathable air and methane for rocket fuel.

As a 2016 NASA study makes clear, ice may yield more water per scoop than minerals, but if accessing this ice requires digging through 30 feet of rock, then ice mining ends up being too inefficient. That picture changes, however, if ice sheets lie within only a few feet of the surface.