The ancient lunar surface once erupted with geysers of lava — and now, scientists think they know what caused those fiery fountains.

Current research suggests that the moon formed when a Mars-size object barreled into Earth in the early solar system, and for a long time, its surface was much different from the staid, unmoving landscape present today. Rather, the moon's surface was hot and active, and magma often bubbled up from below and broke the surface in fiery fountains — like a molten-hot version of Old Faithful. Until recently, researchers were unsure of the driving force behind those explosions, which could reveal more about conditions on the early moon.

But now, scientists may have found a possible culprit for the molten explosions: carbon monoxide. [Watch: How the Moon Was Made]

"The carbon is the one that is producing the large spectacle," said Alberto Saal, a geologist at Brown University in Providence and co-author of the new study. "With a little bit of water, with a little bit of sulfur — but the main driver is carbon."

This finding suggests the early moon's makeup was very close to early Earth's, Saal told Space.com. "All these volatile elements … are in concentrations that are very similar to the lava that formed the ocean floor of the Earth," he said.

Bubbling up

The revelation that carbon monoxide could be behind the fire fountains comes from new studies of volcanic glasses that pepper the surface of the moon. The glasses act as tiny time capsules of the lunar conditions at the time the glasses hardened — the droplets formed from molten lava and act as a record of the lava's makeup, and they often contain crystals enclosing tiny dots of magma, called melt inclusions, which preserve gases that otherwise would have escaped.

New measurements of that volcanic glass suggest that magma flowing deep within the early moon was steeped in carbon, which combined with oxygen to form carbon monoxide as the magma rose. As it approached the surface, the pressure lessened, so the carbon monoxide began to bubble out more and propel upward, the researchers said in the study.

"Imagine that you have a soda," Saal said. "If you open the lid, you will see that a lot of gas will [escape] from the liquid — that's because you decreased the pressure."

A similar process happened as the magma rose. "As the melts move from the deep to the surface … you get more and more bubbles, because the liquid cannot hold these gases in it as you decrease the pressure," Saal explained. The process ends explosively, with lava fountaining out of the moon's surface.

Although earlier research had not definitively identified carbon in moon samples, a new measurement technique had a high enough resolution, and eliminated enough noise, to pinpoint it.

"This breakthrough depended on the ability of Carnegie's NanoSIMS ion probe to measure incredibly low levels of carbon, on objects that are the diameter of a human hair," Erik Hauri, a geochemist at Carnegie Institution for Science and a co-author of the paper, said in a statement. "It is really a remarkable achievement both scientifically and technically."

The researchers found low levels of carbon in the glass overall, but much higher levels in the tiny dots of preserved magma. Based on the changing concentrations of carbon and hydrogen, they adapted a model of how gases escape and found that the carbon combined with oxygen burst out first, causing the eruption, and then the hydrogen gas escaped afterward. [Moon Quiz: Test Your Lunar Smarts]

An active moon

Saal's team was the first to discover traces of water on the moon, in 2008, from similar glass samples. That discovery prompted researchers to drastically reimagine the moon's makeup, which they'd thought had lost any volatile elements (which turn to gas at relatively low temperatures) much earlier.

"OK, we have chlorine, sulfur and fluorine that, previously, people had demonstrated," Saal said. "Then, we demonstrated that with water. That changed the whole game."

On Earth, water plays a role in fire-fountain explosions by providing hydrogen, an explosive gas. But the moon samples didn't show any sign of the changes that would come from an explosion caused by hydrogen. Finding traces of carbon likely solves that mystery.

And adding carbon to the list, the lunar surface seems to have the full complement of volatile substances also found in traces of the lava that formed the Earth's floor, the researchers said.

Saal said that measurements on more samples and of other volatile elements will clarify the picture, but that all of the evidence thus far suggests that there's a much smaller difference between the volatile elements found on Earth and those on the moon than scientists had previously thought. According to Saal, this finding suggests that either some of Earth's volatile elements survived the impact that created the moon or that they both got volatile elements from the same source after formation, like meteorites.

"The discovery in 2008 of water in the glassy volcanic products of eruptions that occurred on the moon over 3 billion years ago challenged the long-held assumption of a volatile-free moon," Bruno Scaillet, a mineralogist at the Institute of Earth Sciences of Orleans in France, who did not work on the study, wrote in a companion article in the journal Nature Geoscience. Now, the detection of carbon and its degassing patterns offer "further evidence that the Earth and moon may share a common volatile source," he wrote.

Understanding where those elements came from can reveal a lot about a planetary body's origins and evolution, Scaillet said. "Volatile elements can influence the existence and operation of plate tectonics, determine the composition and evolution of the atmosphere, and are important for the potential emergence of life," he wrote.

The new work was detailed Aug. 24 in the journal Nature Geoscience.