Lunar rocks brought home by US astronauts contain droplets of water chemically identical to that on ancient Earth

Traces of water inside the moon were inherited from ancient Earth, according to a fresh analysis of lunar rocks brought home by US astronauts.

The findings make for a clearer picture of our cosmic neighbour, once viewed as an arid expanse, but now considered a frost-coated rock that holds water throughout.

The latest results come from studies on the most extraordinary samples hauled back from the moon, including green-tinged stone collected by Apollo 15 in 1971, and orange material gathered by Apollo 17 in 1972.

The surprise discovery of the green rock, by Commander Dave Scott and lunar module pilot Jim Irwin, sparked a lengthy debate among the astronauts about the boulder's true colour while Nasa controllers listened in.

Scientists focused on tiny droplets of volcanic glass that were trapped in crystals inside the rocks. The crystals protected the droplets from the violence of eruption, and so preserved in them a snapshot of the moon's ancient interior.

Researchers found evidence for water inside the glass droplets in earlier work but the latest study goes further, showing that the lunar water is chemically identical to that on ancient Earth.

Much of Earth's water is thought to have arrived in meteorites called carbonaceous chondrites that ploughed into the planet as it formed in the early solar system.

According to the leading theory, the moon was created some time later, about 4.5bn years ago, from a hot cloud of debris that was knocked into space when a planet the size of Mars slammed into Earth.

The latest findings suggest the Earth was already damp at the time the moon was created, and that the intense heat of the collision failed to vapourise all of the water. "Some of that water survived the impact, and that's what we see in the moon," said Alberto Saal, a geologist at Brown University.

Scientists can tell roughly where in the solar system water came from by analysing its chemical signature. Water that formed far from the sun contains proportionally more deuterium, a heavy isotope of hydrogen, than water that formed closer to the sun.

When Saal's team studied water in the glass droplets, they found the ratio of deuterium to normal hydrogen was fairly low, and matched that of water found in carbonaceous chondrites. As much as 98% of Earth's water may have come from these primitive meteorites.

"The water in the moon came from the same source that brought the water to Earth, and that was carbonaceous chondrites," Saal told the Guardian.

Carbonaceous chondrites formed in the asteroid belt near Jupiter and are among the oldest objects in the solar system. The findings, reported in the journal Science, rule out comets as the source of the moon's water. Comets form in the farthest reaches of the solar system, and water inside them tends to have a higher ratio of deuterium to hydrogen.

"The new data provide the best evidence yet that the carbon-bearing chondrites were a common source of volatiles in the Earth and the moon, and perhaps the entire inner solar system," said Erik Hauri, a co-author of the study at the Carnegie Institution of Washington.