General Motors, facing criticism from both President Trump and his Democratic rivals over recent plant shutdowns, promised Friday to invest an additional $1.8 billion in U.S. factories, one of which will build a vehicle originally slated for overseas production.

The spending, which includes a $300 million upgrade of an Orion, Mich., plant that will build a new electric vehicle under its Chevrolet nameplate, will create 700 more jobs and support 28,000 current positions in six states. The new Chevy will join the electric Bolt, furthering the Detroit-based company's commitment to a technology widely promoted as reducing carbon emissions.

"We are excited to bring these jobs and this investment to the U.S.," CEO Mary Barra said in a meeting with Orion employees and local government officials. The plant already manufactures the Bolt, GM said, and the new model is based on an advanced version of the same platform. Relocating its production will support rules in the redrawn North American Free Trade Agreement, which Congress has yet to approve.

GM's investment may blunt some of the harsh rhetoric from Trump, who has blasted the company's plan to save $6 billion by closing five factories including one in Lordstown, Ohio, a state that contributed to his 2016 victory.

"What's going on with General Motors?" the president asked during a Wednesday campaign speech in Lima, Ohio, in which he credited his policies with driving a booming economy and urged workers to drive over to Lima to convince GM to change its mind. "Get that plant open or sell it to somebody and they’ll open it," he added. "Everybody wants it. Sell it to somebody or open it yourselves."

[Related: Trump says he spoke with GM CEO about reopening Ohio factory]

Democratic presidential hopefuls Beto O'Rourke, a former congressman who ran an unsuccessful campaign in Texas for U.S. Senate, and Sen. Bernie Sanders, I-Vt., have also faulted the automaker.

"GM is not a poor company," Sanders said after the plant idlings were announced in November, noting that the company had, at that time, spent $100 million stock buybacks and paid its CEO $22 million. "The corporate greed of General Motors is destroying the social fabric of America."

GM is in the process of adding 1,000 jobs at its Flint, Mich., truck assembly plant and announced this week that it will build a new Cadillac CT5 sedan at the state's Lansing Grand River factory. The company, which has an American workforce of more than 90,000, will "continue to invest in our U.S. operations where we see opportunities for growth," Barra said.