Spain has added its name to the growing number of European countries banning new oil & gas exploration with new, far-ranging legislation also aiming to supercharge renewable energy production in its national energy mix.

The climate change and energy transition law — which was passed by the Spanish parliament last week — immediately bans new oil and gas concessions, prohibits the sale of fossil-fuel vehicles by 2040, and makes it illegal to produce fossil fuels in the country from the start of 2043.

Spain’s vice-president and minister for ecological transition and demographic challenge, Teresa Ribera, said the law’s approval would be “essential” to the country's aim to reach net-zero emissions by mid-century and that it had been “been postponed for too long”.

“We set a milestone, a starting point from which we can always look forward and go further, never less. This law addresses complex challenges at a difficult time for our society", she said.

“Extreme weather events... cost our country an average of almost 700 lives and €900m per year... [this is a reason to] insist on the urgency of transforming our development model and our way of life, integrating sustainability and resilience criteria”.

The bill also aims to ratchet up the share of renewable energy in Spain’s power generation mix to 74% by 2030.

Spain's main remaining producing oil & gas assets are in the Mediterranean Sea, off the coast of Tarragona. Transitioning national oil company Repsol operates the Lubina and Montanazo oil fields in the area, which have a net production of 1,320 barrels per day of oil equivalent.

Romain Ioualalen, senior campaigner at Oil Change International, said: “The Spanish decision is a welcome development. It is further proof that the escalating climate crisis means that no country can claim to be a climate leader if they don’t put an end to fossil fuel expansion and commit to phasing out production.

“Countries with similar policies must work together to ensure that aligning fossil fuel production with the goals of the Paris Agreement is at the center of international climate policy discussions.”

Spain's move follows the announcement by Denmark in December to end oil & gas exploration and production from the North Sea by 2050 as part of the country's efforts to become "climate neutral". France agreed in 2017 to phase out fossil-fuel production by 2040, and Ireland outlawed new onshore and offshore oil & gas exploration in February 2018.

The international Lofoten Declaration, signed by over 700 civil society organisations and leaders worldwide, makes an urgent appeal to wealthy fossil-fuel-producing nations to “lead in putting an end to fossil fuel development and to manage the decline of existing production.”

Spain is witness a flourishing of its renewable energy sector after years of inactivity in the 2010s, after an overly generous government feed-in tariff proved to be a far greater strain on national coffers than expected. The country has seen more than 7GW of solar and almost 1.5GW of wind power installed over the past two years.

Spain's largest oil company Repsol, which in its 2021-25 strategic plan said it plans to become a multi-energy company with net-zero emissions by 2050, recently launched the first two wind farms of the 860MW Delta 2 cluster in the northeastern region of Aragon, the company's largest renewables foray to date.

The country also has one of Europe’s most active corporate renewables markets, an attractive merchant power market, and has also announced a 2030 target for 4GW of green hydrogen and 20GW of power storage.

“The impact of climate change is already evident in our country: Storm Gloria, which battered the Spanish coastline, and Storm Filomena, which immobilised a large part of the country last January, are just two phenomena that show the severity of the effects of climate change,” said Ribera.