There are water molecules and ice up on the Moon, so how did they get there? Asteroid and comet collisions are likely to have produced some of it, but a new study suggests another source of lunar water: the Earth's atmosphere.

Hydrogen and oxygen ions escaping from our planet's upper atmosphere and then combining on the Moon could have created as much as 3,500 cubic kilometers (840 cubic miles) of surface permafrost or subsurface liquid water, scientists say.

The thinking is that hydrogen and oxygen ions are driven into the lunar surface as the Moon passes through the tail of the Earth's magnetosphere (the teardrop-shaped bubble around Earth affected by its magnetic field). That occurs five days in every lunar month.

Because of the Sun's solar wind pushing against this bubble, some of Earth's magnetic field lines are broken: only tethered to the planet at one end.

When the Moon interferes with the tail of Earth's magnetosphere, some of these broken connections get fixed, which leads to hydrogen and oxygen ions that had previously escaped Earth's atmosphere suddenly rushing back towards it.

"It is like the Moon is in the shower – a shower of water ions coming back to Earth, falling on the Moon's surface," says geophysicist Gunther Kletetschka from the University of Alaska Fairbanks.

There's no Moon magnetosphere, so as the ions smack into the lunar surface, permafrost is created, the researchers suggest. Some of that frost, through a variety of geological processes, could be driven below the surface and turned into liquid water.

The suggestion by the researchers is that there's been a slow accumulation of these ions over the billions of years since the Late Heavy Bombardment, that period of time when the early Earth and Moon were peppered with heavy impacts from other celestial bodies hurtling through space.

Gravitational data from NASA's Lunar Reconnaissance Orbiter was used to look closely at the Moon's polar regions and several major craters. The team spotted anomalies that could indicate rock fractures capable of trapping permafrost.

"Crater impacts, forming structural extensions and fractures, allow suitable pore space networks for hosting large subsurface liquid water reservoirs," write the researchers in their published paper.

"Back of envelope calculations suggested several thousands of cubic kilometers of water phase may have accumulated this way into the subsurface of the Moon over the past 3.5 billions of years."

The distribution of surface ice at the Moon's south pole, left, and north pole, right. (NASA)

While it's likely that the water on the Moon comes from several sources – including hydrogen and oxygen reactions triggered by solar winds, scientists think – a lot of it may well have arrived through this method.

The predicted accumulation would be enough to fill Lake Huron in North America. The cover provided by craters and rock fractures would then give the necessary cover to prevent the water from evaporating back out into space.

NASA is keen to set up a long-term human presence on the Moon, and for that to happen there needs to be a suitable lunar station with a nearby water source. This latest research could help experts to decide where to put that station.

"As NASA's Artemis team plans to build a base camp on the Moon's south pole, the water ions that originated many eons ago on Earth can be used in the astronauts' life support system," says Kletetschka.

The research has been published in Scientific Reports.