WASHINGTON — Scientists have a found a quick way to turn heat-trapping carbon dioxide gas into harmless rock.

Experts say the results of a $10 million experiment called CarbFix, conducted about one-third of a mile deep in the rocks of Iceland, offer hope for a weapon to help fight global warming.

When an international team of scientists pumped a carbon dioxide and water mix into underground basalt rocks, chemistry took over. The mixture dissolved the rocks’ calcium magnesium and formed limestone, a natural jail for the heat-trapping gas, according to Juerg Matter of the University of Southampton. He is the author of a study detailing the experiment published Thursday in the journal Science.

“It’s no longer a gas,” Matter said. “Basically carbon dioxide is converted into stone.”

Scientists thought the process could take hundreds of thousands of years. But after two years, 95 percent of the gas was captured and converted, the study said.