DETROIT (Reuters) - General Motors Co said on Monday it will cut production of slow-selling models and slash its North American workforce because of a declining market for traditional gas-powered sedans, shifting more investment to electric and autonomous vehicles.

GM’s actions add up to the biggest restructuring for the U.S. No. 1 carmaker since its bankruptcy a decade ago, and mark a turning point for the North American auto industry. U.S. automakers have enjoyed nearly a decade of prosperity since the 2008-2009 financial crisis and the government bailouts of GM and the former Chrysler Corp.

GM’s announcement immediately drew criticism from U.S. President Donald Trump, highlighting the political risks facing GM.

He demanded the automaker find a new vehicle to build in Ohio and added that he had told GM Chief Executive Mary Barra he was unhappy with her decision to cut production at an Ohio factory. Ohio will be a key state in the 2020 presidential campaign.

“I have no doubt that in the not too distant future, they’ll put something else. They better put something else in,” Trump, who has pushed for more manufacturing jobs throughout his almost two years in office, said.

GM did not immediately comment on Trump’s remarks, but the company noted it has other facilities in Ohio including a transmission plant in Toledo and metal center in Parma.

GM and its rivals are facing rising bills for technological transformation, increased risks from U.S. trade policy and investors reluctant to fund their traditional product strategies.

Barra on Monday portrayed the decision to put five North American factories on notice for potential closure and cut nearly 15,000 jobs as necessary to keep the company strong as it plows money into new technology and new businesses such as robo-taxi services.

“This industry is changing very rapidly,” Barra said during a press briefing. “These are things we are doing to strengthen our core business.”

GM shares rose as much as 7.8 percent following the announcement, and were nearly 6 percent higher at $37.97 in mid-afternoon trading. Shares of Detroit rivals Ford Motor Co and Fiat Chrysler Automobiles NV also rose, outpacing the broader market.

GM plans to halt production next year at three assembly plants: the Lordstown small-car factory near Youngstown, Ohio; the Detroit-Hamtramck complex in Detroit; and the Oshawa, Ontario, assembly complex near Toronto. It will also stop building several models now assembled at those plants, including the Chevrolet Cruze, the Chevrolet Volt hybrid, the Cadillac CT6 and the Buick LaCrosse. The Cruze compact car will be discontinued in the U.S. market in 2019, although GM may continue building it in Mexico for other markets, Barra said.

Plants in Baltimore, Maryland, and the suburban Detroit community of Warren, Michigan, both of which make powertrain components, have no products assigned to them after 2019 and are at risk of closure, GM said. The company said it will also close two unidentified factories outside North America.

“We are right-sizing capacity for the realities of the marketplace,” Barra said.

GM is also moving to cut capital spending overall, even as it says it will double the resources dedicated to electric and self-driving vehicles over the next two years.

GM last year promised to launch a fleet of 20 new battery electric vehicles in North America by 2023, along with at least 10 new electric vehicles in China by 2020. The expenditures to bring those vehicles to production will start to hit with new batteries and body architectures designed to generate profits.

GM also is ramping up hiring at its GM Cruise autonomous vehicle unit, pushing to overcome technical challenges and make good on a plan to launch a robo-taxi service next year.

Even with the higher spending on electric and autonomous vehicles, GM plans to reduce overall annual capital spending to $7 billion by 2020 from an average of $8.5 billion a year during the 2017-2019 period. The automaker has come under pressure from investors to return more cash in the form of share buybacks and dividends.

Slideshow ( 21 images )

Cost pressures on GM and other automakers and suppliers have increased as demand has waned for traditional sedans. The company has said tariffs on imported steel, imposed earlier this year by the Trump administration, have cost it $1 billion.

Barra did not link Monday’s cuts to tariff pressures, but said trade costs are among the “headwinds” GM faces as it deals with broader technology change and market shifts.

GM’s actions provoked anger from political figures on both sides of the U.S.-Canada border, and from its main North American unions.

The United Auto Workers, which represents U.S. workers, vowed to fight the cuts. “General Motors’ decision today ... will not go unchallenged by the UAW,” said Terry Dittes, the union’s vice president in charge of negotiations with GM. Some UAW workers could land jobs at other GM factories, but many will face uncertain futures unless GM reverses course.

Slideshow ( 21 images )

Canadian Prime Minister Justin Trudeau said he spoke with Barra and expressed “deep disappointment.”

In the United States, Trump’s economic adviser, Larry Kudlow, was scheduled to meet with Barra on Monday.

GM said it will take pre-tax charges of $3 billion to $3.8 billion to pay for the cutbacks, but expects the actions to improve annual free cash flow by $6 billion by the end of 2020.

SMALLER WORKFORCE

GM’s North American salaried workforce, including engineers and executives, will shrink by 15 percent, or about 8,000 jobs. The company said it will cut executive ranks by 25 per cent to “streamline decision making.”

Even as GM is moving to lay off salaried staff, the company is hiring. At GM’s Detroit headquarters on Monday, there were signs directing people to a “new hire orientation” meeting.

Barra said GM can reduce annual capital spending by $1.5 billion and increase investment in electric and autonomous vehicles and connected vehicle technology because it has largely completed investing in new generations of trucks and sport utility vehicles. Some 75 percent of its global sales will come from just five vehicle architectures by the early 2020s, which means GM can reduce the people and capital required to keep its product portfolio updated.

Unlike Japanese automakers Nissan Motor Co Ltd, Honda Motor Co Ltd and Toyota Motor Corp, which rely on a more flexible system where they make multiple vehicles at a single plant, GM has too many factories that make just a single model.

The collapse in sales of compact and midsize sedans has hit certain GM models harder than rival Japanese brands. Sales of the Honda Civic are down 11 percent through the first 10 months of 2018. But sales of the Chevrolet Cruze are off 22 percent.

The Hamtramck and Lordstown assembly plants are currently operating on one shift. A rule of thumb for the automotive industry is that if a plant is running below 80 percent of production capacity, it is losing money. GM has several plants running well below that, and Barra said North American operations overall were operating at 70 percent capacity. Consultancy LMC estimates that Lordstown operates at just 31 percent of production capacity in 2018.

Through the UAW, workers at Lordstown have worked to improve quality, cut the number of union locals to make it easier for GM to negotiate and agreed to the outsourcing of some jobs, in a bid to persuade the automaker to add more models to its factory line.

Trump won Ohio in 2016 campaigning on bringing manufacturing jobs back to America.

“So far, President Trump has been asleep at the switch and owes this community an explanation,” U.S. Representative Tim Ryan, a Democrat whose district includes Lordstown, wrote on Twitter.

At the same time, many of GM’s plants producing its higher-margin trucks and SUVs are running on three shifts, with some running six and sometimes seven days a week to keep up with demand. Some displaced GM car plant workers could find jobs at truck factories, GM officials said.

Rivals Ford and Fiat Chrysler have both curtailed U.S. car production. Ford said in April it planned to stop building nearly all cars in North America. Fiat Chrysler moved even earlier to discontinue most of its sedans.