It is not raining on the Moon, but it does seem to be getting wetter and wetter.

For decades, the prevailing view of the Moon was that it was dry. Then, two years ago, a NASA probe crashed into a deep crater near the Moon’s south pole and confirmed large amounts of water ice within the shadows. Meanwhile, measurements by an orbiting Indian spacecraft suggested that a veneer of water, generated by the bombardment of solar wind particles, covered much of the Moon’s surface.

Now, scientists analyzing tiny fragments of hardened lava from long-ago lunar eruptions report that the fragments contain about as much water as similar magmas on Earth, meaning there is plenty of water inside the Moon too.

“I have to admit, we were a little surprised,” said Erik H. Hauri, a staff scientist in geochemistry at the Carnegie Institution of Washington and lead author of a paper published Thursday in the journal Science.

Dr. Hauri’s surprise comes despite the fact that he and several of his co-authors predicted three years ago that they would find that much water. Back then, they looked at tiny beads of volcanic glass — the beads were about the size of periods in printed text — in soil brought back by Apollo astronauts. The beads contained water, but not a lot a lot of it: a maximum of 46 parts per million — or 0.0046 percent water. Their models suggested that 95 percent of the water originally in the hot magma escaped as it cooled.