GENEVA (AP) — The head of the U.N. weather agency says the war in Ukraine “may be seen as a blessing” from a climate perspective because it is accelerating the development of and investment in green energies over the longer term — even though fossil fuels are being used at a time of high demand now.

The comments from Petteri Taalas, secretary-general of the World Meteorological Organization, came as the world is facing a shortfall in energy needs — prompted in part by economic sanctions against key oil and natural gas producer Russia — and prices for fossil fuels have risen.

That has led some countries to turn quickly to alternatives like coal. But rising prices for carbon-spewing fuels like oil, gas and coal have also made higher-priced renewable energies like solar, wind and hydrothermal more competitive in the energy marketplace.

The energy crunch has also led many big consuming countries in Europe and beyond to initiate conservation measures, and talk of rationing has emerged in some places.

Taalas acknowledged that the war in Ukraine has been a “shock for the European energy sector,” and has prompted an upturn in the use of fossil energies.

“From the five- to 10-year timescale, it’s clear that this war in Ukraine will speed up our consumption of fossil energy, and it’s speeding up this green transition,” Taalas said.

“So we are going to invest much more in renewable energy, energy-saving solutions,” and some small-scale nuclear reactors are likely to come online by 2030 as “part of the solution,” he said.

“So from climate perspective, the war in Ukraine may be seen as a blessing,” Taalas added.

He was speaking as WMO issued a new report that said the supply of electricity from cleaner sources of energy needs to double within the next eight years to curb an increase in global temperatures.

The latest “State of Climate Services” annual report — based on contributions from 26 different organizations — focuses this year on energy.

Taalas said the energy sector currently is responsible for about three-quarters of emissions of heat-trapping greenhouse gases, and he called for a “complete transformation” of the global energy system.

He warned that climate change is affecting electricity generation — and it could have an increasing impact in the future. Among the risks, nuclear plants that rely on water for cooling could be affected by water shortages, and some are located in coastal areas that are vulnerable to sea-level rise or flooding.

In its report, WMO noted that in 2020, some 87% or global electricity generated from thermal, nuclear and hydroelectric systems — which produce less CO2 than plants run by fossil fuels — depended on water availability.