Socialist Prime Minister Pedro Sanchez's government on Tuesday included the proposal in a draft document for an energy transition law which also calls for Spain to completely decarbonise its economy by 2050.
The announcement comes a year after Britain and France both pledged to ban new diesel and petrol cars by 2040, while Norway is aiming to end the use of all cars running on fossil fuels by 2025.
Sanchez's government lacks a majority in parliament and it will need to gain the support of other parties to approve the law.
The plan calls for setting up charging points for electric vehicles while cities with over 50,000 inhabitants will have to set up “low emission zones” before 2021, like those that already exist in the centre of Madrid and
Barcelona where traffic is restricted.
“By 2050, the electricity system will have to rely exclusively on renewable energy sources,” the document said.
Under the plan new licences for hydrocarbon exploration and fracking will be banned and subsidies that “favour the consumption of fossil fuels” will end.
Sanchez warned Sunday that climate change was “the biggest challenge we face globally”, adding it was necessary to “act with urgency and determination” before this “great silence war”.