Norway is aiming to sell only electric cars by 2025, while India is aiming to be all electric by 2030.

Carmakers are racing to respond. Volkswagen said Tuesday that it intended to sell 22 million electric cars over the next 10 years, compared with its previous goal of 15 million, and that the company would aim to be carbon neutral by 2050.

The investments necessary for building electric cars have added to cost pressures for automakers that, in some cases, have struggled to turn a profit in Europe.

In justifying the closing of its Swindon factory, Honda said it wanted to focus on electrification . “The significant challenges of electrification will see Honda revise its global manufacturing operations, and focus activity in regions where it expects to have high production volumes,” the company said.

China is speeding ahead on electric cars

As carmakers channel billions of dollars into grabbing a portion of the electric car market, many are looking to China, which is the world’s largest maker and seller of electric cars.

China wants one in every five cars sold to run on an alternative fuel by 2025, and officials have said the country will get rid of internal combustion engines in new cars altogether. The country’s rules also require carmakers to sell more alternative-energy cars if they want to continue selling regular models.

This has prompted car companies to realign where they make and develop cars.

Tesla has opened a factory there. Volkswagen signed an agreement with the Anhui Jianghuai Automobile Group last year to develop an electric vehicle. General Motors has made China the hub of its electric car research and development, while both Renault-Nissan and Ford have joint electric-car ventures in China.