General Motors said Thursday it will boost investment in electric and autonomous vehicle technology by $7 billion through mid-decade as it accelerates a technology race with Tesla and other automakers.

"Climate change is real, and we want to be part of the solution by putting everyone in an electric vehicle," said GM Chief Executive Mary Barra.

"We are transitioning to an all-electric portfolio from a position of strength and we're focused on growth."

The US auto giant now plans to spend $27 billion in the newer ventures through 2025, up from the $20 billion planned before the coronavirus pandemic.

The boost to capital spending follows an unveiling of the all-electric Hummer truck last month and a series of announcements on building new electric auto manufacturing capacity, including the revamping of older plants.

GM is turning its Detroit-Hamtramck assembly plant into an electric vehicle manufacturing facility
GM is turning its Detroit-Hamtramck assembly plant into an electric vehicle manufacturing facility GETTY IMAGES NORTH AMERICA / BILL PUGLIANO

The company estimates that 40 percent of its US models will be battery electric vehicles by the end of 2025.

The growth of the industry partly depends on construction of more electric-auto charging stations in the coming years. There are currently 28,165 stations in the United States compared with 168,000 gas stations in the US, according to federal data.

GM has reported a string of strong results in recent years based heavily on sales of larger trucks and sport-utility vehicles in the United States, but much of the company's investment has gone to electric and autonomous vehicles.

The company said the electric battery packs in current vehicles cost around 40 percent less than those used in the Chevrolet Bolt electric vehicle, and that costs will be cut by another 60 percent in new battery packs.

"GM's EV development times are speeding up and costs are going down rapidly, so we expect our Ultium EV programs to be profitable from the first generation on," said GM executive vice president Doug Parks.