General Motors is increasing its spending on electric vehicles, planning more electric cars, trucks and SUVs than previously announced and that it will produce many of them sooner than originally planned, the company announced Thursday.

“We are resolved as a management team to move even faster to expedite the transition to EVs,” GM CEO Mary Barra said in a statement.

Among the key factors: Improving batteries and lower costs.

Doug Parks, GM’s head of global product development, also touted improvements in GM’s battery technology. Vehicles with GM’s Ultium battery system will be able to go up to 450 miles instead of GM’s previously stated 400 miles. Only models with the largest battery packs will be capable of that sort of range, though.

Battery cost is the main reason electric vehicles cost more than gasoline-powered ones. GM has not yet produced the first vehicles using the new Ultium battery system the company publicly revealed last March but, already, a second generation of the technology is being tested, executives said. These second-generation Ultium battery packs will cost 60% less than the first generation and will be able to hold twice as much electricity, GM claimed.

JPMorgan upgrades Cree for ‘pole position’ in electric vehicle market; stock surges

These new battery packs, which will allow GM to sell electric vehicles at lower prices and with larger profits will be ready in about five years, the automaker said.

GM had previously said it would commit $20 billion to the development of electric and fully autonomous vehicles over the next five years. The automaker announced that’s being increased to $27 billion through 2025. Autonomous vehicles are ones that can drive themselves without human input, like the Cruise Origin being developed by GM and Honda. Because of the high power requirements of their computers and sensors, autonomous vehicles are often hybrid or electric.

In five years, 40% of GM models sold in the US will be electric, GM said. This will include models from all of GM’s US passenger vehicle brands, GM said. As part of this plan, GM is also accelerating its vehicle development timeframe so that some vehicles, such as the Cadillac Lyriq SUV, will arrive on dealer showrooms earlier than originally planned.

GM’s accelerated move into electric vehicles is, in part, probably a result of increasing regulatory pressure, said Sam Abuelsamid, an industry analyst with the consulting firm Guidehouse. For instance, California recently announced a plan to ban sales of fuel-burning vehicles by 2035. But it’s also genuinely a recognition that the automaker’s engineers were making faster progress than originally anticipated, he said.

There has also been increasing pressure from startup automakers, Abuelsamid said. Tesla is already the world’s largest-selling EV maker. Now new companies like Lucid and Fisker are preparing to enter the market soon. These companies have attracted enormous interest from investors.

“I think that all of these things combined and allowed them to make the decision to both expand and accelerate the program,” he said.

There is general agreement that, beyond regulations, electric vehicles will eventually begin to replace internal combustion powered vehicles, Abuelsamid said. It’s just a matter of how soon that will happen and when GM wants to be ready, Abuelsamid said,

“They’ve made progress in areas where they think they can get the cost down and make it a viable business and make it attractive to customers from a capability standpoint, from a price standpoint and to really make make a true business out of this,” he said.