Water on the moon and the Earth originally came from the same place, an analysis of moon rocks suggests.

The discovery means the moon's water most likely originated from Earth itself, says Alberta Saal, the lead author of the study published Thursday online in Science.

That possibility is forcing scientists to reconsider the details of a long-held theory about how the moon formed in the first place.

The popular theory is that moon came together from debris left behind 4.5 billion years ago when a huge object — likely a Mars-sized planet-like rock — crashed into the "proto-Earth," the object that gave rise to our planet. According to theory, that impact would have generated so much heat that water and elements such as hydrogen needed to form water would all have boiled off into space, leaving the young Moon completely dry.

NASA has since found significant amounts of water both on and below the moon's surface, and some scientists had speculated it may have been brought by a comet long after the moon formed.

However, Saal, a geochemist at Brown University said the "simplest explanation" for his findings is that there was water on the proto-Earth at the time of the huge impact.

"Some of that water survived the impact, and that's what we see in the moon," he said in a statement.

If that's the case, it suggests that some volatile gases may survive big impacts between objects in space, contrary to current scientific theory.

NASA discovered a surprising amount of water on the moon in 2009 when it crashed a spent rocket into the moon's Cabeus crater and measured the amount of water in the resulting plume of debris. The Lunar Crater Observation and Sensing Satellite, designed to determine whether water exists at the moon's poles, detected 155 litres of ice and vapour as a result of the rocket impact.

Water trapped in glass bubbles

In 2011, a team led by Erik Hauri, a geochemist at the Carnegie Institution in Washington, D.C., examined bubbles of melted glass trapped in crystals within some of the moon rocks brought back by the Apollo 15 and Apollo 17 missions in the early 1970s. Water and gases trapped inside such glass bubbles can't escape and can be preserved for billions of years.

The study found that the bubbles, called melt inclusions, contained as much water as lavas forming on Earth's ocean floor.

The latest study examined the chemical fingerprint of the water trapped in the bubbles. Water is made up of oxygen and hydrogen, and hydrogen can come in two forms or isotopes — a more common, lighter form and a heavier form known as deuterium. The ratio of deuterium to hydrogen is a chemical fingerprint that can point to the origin of the water.

In this case, the relatively low deuterium/hydrogen ratio in the bubbles matched the ratio found in carbonaceous chondrites, very ancient meteorites from the asteroid belt near Jupiter. According to Saal, as much as 98 per cent of the water on Earth also comes from carbonaceous chondrites.

The fingerprint rules out the possibility that the water in the moon rocks came from a comet, since comet water tends to have very high deuterium/hydrogen ratios.

The study was funded by NASA's cosmochemistry and LASER programs and by the Brown/MIT NASA Lunar Science Institute.