LONDON—Global wind- and solar-power capacity grew at a record pace last year even as the pandemic sent overall energy demand sharply lower, oil giant BP PLC said in its annual review of global energy markets.

Growth in renewables—led by China—saw global solar-power capacity rise around 22%, while wind-power capacity rose around 18% compared with the previous year, BP said Thursday. The combined rate of additions was the highest since BP started publishing the Statistical Review of World Energy, a closely watched report card on energy use, 70 years ago.

The gains for lower-carbon power come as companies and governments around the world seek to embrace renewable power as part of efforts to reduce emissions and address climate change.

Still, renewable energy as a whole, which includes solar and wind but also geothermal and biomass, represented just 6% of the world’s energy consumption last year, the review found.

Oil made up 31% of consumption, coal 27%, and natural gas 25%. The remainder was made up of hydroelectricity and nuclear power.

A BPX Energy plant in Reeves County, Texas; BP reported that global electricity demand was more resilient than other energy sources last year.

A BPX Energy plant in Reeves County, Texas; BP reported that global electricity demand was more resilient than other energy sources last year.

Photo: Justin Hamel for The Wall Street Journal

While Covid-19 related lockdowns hit the global economy hard last year, in turn hurting demand for oil, coal and gas, renewable-energy projects take years to plan and are often supported by government subsidies, so are less correlated to economic growth than fossil fuels, BP said.

Overall global energy consumption fell 4.5% last year, its steepest decline since World War II, with transport fuels hardest hit by lockdowns, the review said.

“The nature of the lockdowns detracted from oil demand in a completely different way to a normal recession and essentially those lockdowns just crushed transport-related oil demand,” said Spencer Dale, BP’s chief economist.

Carbon emissions fell by over 6%, a similar magnitude for what is needed annually if the world is to meet the 2015 Paris Accord goal to limit global temperatures rising by 1.5 degrees Celsius, BP said. However, this goal needs to be met without the disruption caused by the pandemic and there are signs the dip in emissions will be short-lived, the report said.

Electricity was more resilient than other energy sources, down 0.9%, as falling demand from industry was partly offset by rising domestic use from people staying home.

The share of renewables in electricity generation increased from just above 10% to nearly 12%, while coal’s share fell around 1% to a record low of 35%. Renewables and hydroelectricity’s combined share of power generation was around 28%.

BP didn’t issue forecasts for the year ahead, but a strong rebound in economic growth has led to expectations among analysts and executives that energy demand will bounce back in 2021.

“I think overall we could well see a strong rebound in energy demand over the next couple of years,” said BP’s Mr. Dale, adding that the recovery would likely be strongest in countries where the rollout of Covid-19 vaccines was advanced and governments were supporting their economies via spending programs.

Write to Sarah McFarlane at sarah.mcfarlane@wsj.com