General Motors will raise spending on electric and autonomous vehicles and add two U.S. battery factories as it gambles that consumers will eagerly switch from gasoline to the new technology. The announcements Wednesday came as crosstown rival Ford said its entire Lincoln luxury brand lineup would be electric or gas-electric hybrid by 2030, including four fully electric vehicles. For months, the automakers have been one-upping each other with electric vehicle announcements, which have fueled stock price increases for both companies.

GM wouldn’t give details about where it will build the new plants, but Chief Financial Officer Paul Jacobson said they would be similar in size to two factories now under construction in Lordstown, Ohio, and Spring Hill, Tennessee. Those factories each will employ more than 1,000 workers and cost about $2.3 billion.

The new plants were to come later in the decade, but now are expected to be in operation around 2025. They are part of GM’s plan to spend $35 billion on electric and autonomous vehicles from 2020 to 2025. The company also said it will switch more U.S. assembly plant capacity to electric vehicles, but gave no details Wednesday.

GM has previously said it would spend $27 billion on electric and autonomous vehicle development by 2025 as it rolled out 30 new electric vehicles worldwide. Jacobson said the company would increase the number of electric vehicles but gave no details. GM has set a goal of selling only electric passenger vehicles by 2035.