At least six major automakers, including Ford, Mercedes-Benz, General Motors, and Volvo, and 30 national governments pledged on Wednesday to work toward phasing out new gasoline and diesel vehicle sales globally by 2040, and in “leading markets” by 2035.

However, some of the world’s largest automakers, such as Toyota, Volkswagen, and the Nissan-Renault alliance, did not sign the pledge, which is not legally binding. In addition, the governments of the United States, China, and Japan, three of the world’s largest auto markets, abstained. Climate advocates hailed the announcement, made during international climate talks here, as yet another sign that the internal combustion engine’s days may be numbered. Every year, electric vehicles set new global sales records, and major automakers have recently begun investing tens of billions of dollars to retool their factories and produce new battery-powered cars and light trucks.

In 2019, the automakers who signed the pledge accounted for roughly one-quarter of global sales.

Britain, Canada, India, the Netherlands, Norway, Poland, and Sweden were among the 30 countries that joined the coalition. Earlier estimates based on conference organizers’ press releases put the number of national governments between 29 and 31.

India’s inclusion was notable because it is the world’s fourth-largest auto market and has not previously committed to eliminating emissions from its vehicles on a specific timeline.

Turkey, Croatia, Ghana, and Rwanda were among the other countries vowing for the first time to sell only zero-emission vehicles by a specific date.

The pledge was also signed by California and Washington State. California Gov. Gavin Newsom signed an executive order last year mandating that only new zero-emissions vehicles be sold in the state by 2035, though regulators have not yet issued rules to make that happen. Washington had not previously made such a formal pledge.

Vehicles with zero emissions could be plug-in electric vehicles or hydrogen fuel-cell vehicles, though the latter have struggled to gain market share. Electric vehicles can still emit emissions indirectly if they are charged with electricity generated by plants that burn coal or natural gas, for example. However, they are generally regarded as cleaner in general than combustion engine vehicles and do not emit pollution from their tailpipes.

Two dozen fleet operators, including Uber and LeasePlan, have also joined the coalition, pledging to operate only zero-emission vehicles by 2030, “or earlier where markets allow.”

Transportation accounts for roughly one-fifth of humanity’s carbon dioxide emissions that cause climate change, with passenger vehicles such as cars and vans accounting for slightly less than half of that.

Concerns about global warming and air pollution have prompted governments all over the world, including China, the United States, and the European Union, to heavily subsidize electric vehicles and impose stricter emissions standards on new gasoline and diesel-powered vehicles.

The cost of lithium-ion batteries has also dropped by roughly 80% since 2013, according to an energy research group, making electric vehicles more competitive with traditional combustion engine vehicles, though many consumers remain skeptical of the new technology due to concerns such as charging station availability.

Despite the fact that some of the major automakers did not sign the agreement, they are investing heavily in electric vehicle technology. Volkswagen, which admitted six years ago to rigging its diesel cars to conceal illegally high emissions, has since outlined plans to invest tens of billions of dollars in the construction of six battery factories, install a global network of charging stations and roll out more than 80 new electric models by 2025.

A Volkswagen spokesman, Nicolai Laude, said that while the German automaker was committed to a rapid transition to electric vehicles, it did not join the new pledge because the global nature of its business required it to be mindful that “regions developing at different speeds combined with different local prerequisites require different pathways” to zero emissions.

Toyota, the world’s best-selling automaker in 2020, was also conspicuously absent from the list of signatories, despite the fact that the company announced plans this year to sell 15 electric vehicle models globally by 2025. The Japanese automaker has been more cautious in its approach to electric vehicle technology, preferring to focus on alternatives such as hydrogen-powered fuel cell vehicles.