Renewable power capacity grew at its fastest pace this century in 2020, the International Energy Agency said Tuesday, raising its growth forecast for wind and solar power for this year and next. According to the Paris-based energy watchdog, renewables were the only energy source for which demand increased last year, with Covid-19 lockdowns hitting consumption of all other fuels as government restrictions shut factories, grounded planes and kept people at home.

The addition to the world’s renewable electricity capacity last year was 45% more than in the prior year—the biggest jump since 1999—as wind and solar farms sprang up across the world’s major economies, the IEA said in a report. The increase of 280 gigawatts in 2020 was partly driven by a rush to complete projects before government subsidies elapsed in China, the U.S. and Vietnam.

Global Renewable Energy CapacitySource: International Energy AgencyNote: Figures for 2021 and 2022 are forecasts. .

The IEA raised its 2021 and 2022 growth forecasts by around 25%, with an addition of 270 gigawatts in capacity expected this year and 280 gigawatts next year.

Growing demand for renewable power comes as governments and companies around the world try to cut carbon emissions with the aim of limiting global warming. The Paris Agreement, which the Biden administration rejoined in February, calls for cutting emissions enough to keep temperatures less than 2 degrees Celsius above preindustrial levels.

“Wind and solar power are giving us more reasons to be optimistic about our climate goals as they break record after record,” said IEA Executive Director Fatih Birol, adding that greater use of lower-carbon electricity was needed for the world to achieve its carbon-reduction goals.

While renewables are gaining ground, fossil fuels remain the world’s dominant source of energy. In 2019, before the coronavirus pandemic hammered global transportation and industry, oil, natural gas and coal accounted for 81% of global energy consumption, the IEA says. That figure is expected to drop to 76% by 2030, though rising overall demand still means increased use of carbon-intensive energy. Carbon emissions also have snapped back from their 2020 plunge.

Some energy giants including Royal Dutch Shell RDS.A -2.10% PLC and BP BP -0.41% PLC have signaled their intentions to reduce their dependence on fossil fuels and invest in lower-carbon energy.

The IEA expects solar power to play a key role in the expansion of global renewables capacity, with additions in 2022 forecast to be 50% higher than they were in 2019. It also forecasts strong growth for wind power in the next two years, albeit at a lower rate than 2020.