Solar panels are seen on the roofs of homes at the well-to-do suburb of Rivas-Vaciamadrid, south of Madrid, Spain, June 6, 2022.
Solar panels are seen on the roofs of homes in the suburb of Rivas-Vaciamadrid, south of Madrid, in 2022. Reuters / SUSANA VERA

Spain's share of electrical generation from renewable sources surpassed 50% for the first time in 2023, Spanish Minister of the Ecological Transition and Demographic Challenge, Teresa Ribera, announced on X (formerly Twitter) on Tuesday.

"50% of the electricity generated was of renewable origin, a figure which in 2023 is up from 42% last year," Ribera said in a video accompanying the announcement on Tuesday.

Spain is now the second European country outside of Scandinavia to reach this target for the first time this year. Germany saw renewable power generation climb to 53% in 2023, up from 44% in 2022, according to preliminary data released Monday.

Germany and Spain were Europe's top two installers of photovoltaic solar facilities in 2023, adding 14.1 and 8.2 gigawatts (GW), respectively, over the past year.

Spain and Germany's renewable sectors have outpaced peer economies with similarly ambitious green transition plans, including France, Italy and the United Kingdom.

Spain's renewable energy growth over recent years has been dominated by onshore wind and solar power. Hydroelectric power, once the country's largest source of energy for electricity generation, now accounts for just over 10% of Spain's energy matrix, a smaller proportion than both solar and wind.

The European Union's energy dilemma that began with the Russian invasion of Ukraine in February 2022 -- figuring out the transition away from natural gas and coal -- appears to be quickly resolving thanks to surging investment in alternative and renewable energy systems, with solar leading the way.

The EU installed 56 GW of solar capacity in 2023, just 4GW short of the International Energy Agency's recommendation of 60GW made in December 2022.

At COP28 in Dubai earlier in December, 118 countries pledged to triple global investment relative to current levels in renewable energy sources by 2030, including the EU.

"Spain's trajectory in solar and wind energy exhibits remarkable growth prospects for the coming years," analysts from Rystad Energy said in a June report that predicted the benchmark of 50% renewable power generation would be achieved before 2024.

"We have pending challenges, but our contribution to the transformation of the European energy system is evident and fundamental," Teresa Ribera said on Tuesday.

The Spanish government under Prime Minister Pedro Sánchez, who controversially secured a new mandate following divided elections in July, has placed solar energy at the center of its green energy strategy, hoping to harness Spain's abundant solar resources to become a major producer and exporter of green hydrogen.

The German government is legally obligated to pursue 80% renewable power generation by 2030, according to legislation passed in 2022.