The world is on the brink of what may turn out to be its most important energy experiment. If proposals to build a new industry producing so-called green hydrogen succeed, we may have the final piece of the puzzle to prevent devastating climate change. If they fail, we may be about to spend hundreds of billions of dollars on a white elephant.

That’s why there’s both excitement and trepidation around the run of dramatic hydrogen announcements from Europe, Australia and Chile in recent months. The European Union alone envisages spending as much as 470 billion euros ($558 billion) on green hydrogen by 2050. To shift the whole world in the same direction would cost at least twice as much.

A viable green-hydrogen industry could power production of steel, cement and fertilizers; fuel trucks, trains, ships and aircraft; and balance wind- and solar-based power grids — and in the process eliminate roughly a quarter of the world’s carbon dioxide emissions. Such a prospect would help decarbonize parts of the economy that wind and solar aren’t well-placed to reach. It would also provide a potent new source of demand for the zero-carbon electricity that powers electrolyzer cells, splitting water into oxygen and green hydrogen.

The future, however, is uncertain. At present, such electrolytic hydrogen is barely more than a cottage industry. Most water-splitters are manufactured by hand, and 99% of the world’s industrial hydrogen is not green but “gray,” produced from gas or coal with the carbon emissions to match. The biggest producer of electrolyzers, Norway’s Nel ASA, can make a modest 80 megawatts per year. To put the world on a path to zero emissions, we’ll need to install two million megawatts or more.

The fact that such an expansive vision is seen as remotely viable is a tribute to the way renewables and lithium-ion batteries have transformed the energy industry over the past decade.

In the mid-2000s, even an advocate of climate action like British economist Nicholas Stern didn’t think wind and solar could compete economically with fossil fuels until the 2030s. Things turned out very differently. Since 2009, the cost of unsubsidized solar power in the U.S. has fallen 90% and wind is down 70%, notes Lazard Ltd. Battery prices have slumped 87% over a similar period, according to BloombergNEF. Coal is already in retreat from the power sector, and many of the world’s biggest independent oil companies think petroleum demand is at or near its peak.