For decades, China has poured hundreds of billions of dollars into green energy, making it a cornerstone of the country’s drive for energy independence. It also blocked foreign companies from competing in large segments of its domestic market, such as manufacturing wind turbines and electric car batteries, to ensure that Chinese companies could grow into giants.

Now the war with Iran has laid bare the risks of reliance on Middle Eastern oil and gas. Countries are realizing that all paths to renewable power run through China and its exporters.