There’s ice on the Moon. Various research efforts have shown this to be the case, and scientists are doing their best to find out exactly how much ice is accessible on the lunar surface. In the not-so-distant future, crewed missions to the Moon may attempt to use that ice as a resource, so it makes sense for scientists to do their best at determining its source.

Now, a new research paper published in the journal Icarus examined the ice-rich south pole of the Moon and suggests that our tiny neighbor’s reserves of frozen water may have accumulated over billions of years.

The ice on the lunar south pole is mostly confined to large craters that dot the surface. NASA’s Lunar Reconnaissance Orbiter has provided scientists with a wealth of data about the Moon’s cratered surface, and the researchers used these observations to date the ice-filled craters.

The researchers found that while many of the larger craters that hold ice may be up to 3.1 billion years old, there are several smaller craters that were created by much more recent impacts. To determine the age of the craters, scientists looked at their size and depth, as well as the features of each crater rim. The smaller craters with “sharper” rims are believed to be much younger, offering clues as to how long it took for all the water to arrive.

Based on their findings, the majority of the water ice that we see on the Moon’s south pole today was deposited from large ancient impacts. The angle of the Sun in relation to the Moon has allowed the ice to persist in the shadows cast over the interior of the craters.

This work will be increasingly important as NASA and other space agencies consider the possibility of setting up permanent lunar bases for research. Knowing where to find the ice means having a reliable source of water, and could facilitate longer stays on the lunar surface for astronauts.