But the plan to save D-Ham with electric pickups, vans and SUVs, as well as the battery modules to power them, is far from a sure bet. With electric vehicles accounting for just a fraction of sales, the billions that GM committed to the plant under its new contract with the UAW represent a huge gamble on an unproven and uncertain market.

And the plant will need extensive retooling to switch from gasoline-powered sedans to battery-electric trucks, meaning workers are still facing the likelihood of a lengthy layoff starting next year.

Production of a pickup and van is scheduled to begin in 2021, followed in 2023 by electric versions of the GMC Sierra and Cadillac Escalade, according to LMC Automotive, a closely watched provider of industry sales and production forecasts. The UAW contract says GM intends to employ 2,225 workers at D-Ham once everything has ramped up, nearly triple the size of its work force today.

"What makes it sort of unprecedented is the scope of EV production at GM," said Stephanie Brinley, principal automotive analyst at IHS Markit.

The dollar amount GM pledged to D-Ham in the contract signals a long-term shift in strategy. The automaker likely believes that "what they are doing there will affect their manufacturing for quite some time," Brinley said.