At least six major automakers — including Ford, Mercedes-Benz, General Motors and Volvo — and more than two dozen national governments pledged Wednesday to work toward phasing out sales of new gasoline and diesel-powered vehicles by 2040 worldwide, and by 2035 in "leading markets.”

But some of the world’s biggest car manufacturers, including Toyota, Volkswagen and the Nissan-Renault alliance, did not join the pledge, which is not legally binding. The governments of the United States, China and Japan — three of the largest car markets — also abstained.

The announcement, made during international climate talks in Glasgow, Scotland, was hailed by climate advocates as yet another sign that the days of the internal combustion engine could soon be numbered. Electric vehicles continue to set new global sales records each year, and major car companies have recently begun investing tens of billions of dollars to retool their factories and churn out new battery-powered cars and light trucks.