European Union countries have passed a landmark law that will ensure all new cars sold from 2035 must have zero emissions.
Poland voted against the law, while Italy, Bulgaria and Romania abstained.
The deal was delayed for weeks after Germany asked for an exemption for cars that run on e-fuels.
E-fuels are said to be carbon neutral because they use captured CO2 emissions to balance the CO2 released when the fuel is burned in an engine.
The new law was expected to make it impossible to sell cars with an internal combustion engine in the EU from 2035.
However, the exemption won by Germany will now help those with traditional vehicles, even though e-fuels are not yet produced on a large scale.
The EU will say how sales of e-fuel-only cars can continue by the end of the year.
Cars and vans are responsible for approximately 12% and 2.5% respectively of total EU emissions of CO2, the main greenhouse gas, according to the European Commission.
Earlier this month, the UN warned that the world is unlikely to meet a target to limit the rise in global temperatures to 1.5C.
The new EU law will require all new cars sold to have zero CO2 emissions from 2035 and 55% lower CO2 emissions from 2030, compared to 2021 levels.
Germany’s late opposition came after EU countries and politicians had already agreed on the 2035 phase-out and sparked anger among some EU diplomats.
“In principle, we don’t like this approach. We think it’s not fair,” said Spanish Energy Minister Teresa Ribera, adding that current assessments suggested e-fuels were too expensive to be widely used.
Porsche and Ferrari are among the supporters of e-fuels, which they see as a way to avoid burdening their vehicles with heavy batteries.
But other automakers such as Volkswagen, Mercedes-Benz and Ford will use electric vehicles to decarbonize.
German Transport Minister Volker Wissing said Tuesday’s agreement “will open up important options for the population towards affordable and climate-neutral mobility”.
EU climate policy chief Frans Timmermans added: “The direction of travel is clear: by 2035, new cars and vans must have zero emissions.”