General Motors said Monday it will close five factories and lay off nearly 15,000 workers in a move that shows the economy may be starting to slow and dents President Trump’s claim to be leading a renaissance for industrial America.

The automaker said it would save $6 billion annually by thinning its salaried management ranks, dropping thousands of American and Canadian factory workers, and emphasizing the production of larger sport-utility vehicles rather than sedans.

GM’s announcement sounded an incongruous note amid otherwise plentiful signs of U.S. economic health. The last six months have produced the economy’s best back-to-back quarters in four years. The unemployment rate is near a half-century low. And corporate profits are exceeding expectations.

Yet the automaker’s overhaul is a reminder that the economic expansion, which began in June 2009, already is the second-longest since modern records began in 1854. Few economists anticipate a recession anytime soon, but the annualized rate of auto sales has fallen by 1 million vehicles since September 2017, and data on retail sales, industrial production and housing all suggest that the economy is tiring.

“We’d be very surprised to see output growth picking up further from here; all the manufacturing cyclical indicators we follow have peaked, and some are declining,” Ian Shepherdson, chief economist for Pantheon Macroeconomics, wrote in a recent research note.

The communities affected by GM’s decision are spread across the nation’s politically vital midsection.

Car plants in Oshawa, Ontario; Detroit-Hamtramck; and Lordstown, Ohio, will stop production of the Chevrolet Impala, Cruze and Volt, the Cadillac CT6, and the Buick LaCrosse next year. Transmission plants in White Marsh, Md., and Warren, Mich., also are halting operations, the company said.

Coming just weeks after Republican candidates lost several congressional seats across the industrial Midwest, GM’s action carries a stark political warning for the president. If voters conclude that Trump failed to deliver on his promise to return lost jobs and prosperity to the region, his reelection hopes could be dealt a blow.

In 2016, he won four states with significant ties to the auto industry: Wisconsin, Michigan, Ohio and Pennsylvania. They provided nearly a quarter of the 270 electoral votes needed for victory.

Before leaving the White House Monday for a campaign rally in Mississippi, the president told reporters he had complained to GM chief executive Mary Barra about the shutdowns.

“I was very tough,” the president said. “I spoke with her when I heard they were closing. And I said: ‘You know, this country has done a lot for General Motors. You better get back in there soon. That’s Ohio, and you better get back in there soon.’ ”

Trump said he was pressing the company to replace lost production in the factories it plans to shutter with other models, citing the Lordstown plant, which makes the Chevy Cruze.

“Their car is not selling well. So they’ll put something else — I have no doubt that, in a not-too-distant future, they’ll put something else. They better put something else in,” he said.

Trump’s ire may be linked to his repeated promises to reverse the Rust Belt jobs hemorrhage that he said had emptied the region’s factories as a result of poorly designed trade policies.

“They’re all coming back. They’re all coming back. Don’t move, don’t sell your house,” the president said during a July 2017 visit to Youngstown, Ohio. “We’re going to fill up those factories or rip them down and build new ones.”

During an October 2016 campaign rally in Warren, Mich., site of one of the targeted transmission plants, Trump promised: “If I’m elected, you won’t lose one plant, you’ll have plants coming into this country, you’re going to have jobs again, you won’t lose one plant, I promise you that.”

Ohio Sens. Rob Portman (R) and Sherrod Brown (D) slammed GM’s decision to shut down the Lordstown plant, with Brown labeling it “disgraceful” and blaming it on “corporate greed.”

GM’s bombshell news comes near the end of a year that has seen the auto industry occupy center stage in the Trump’s “America First” campaign to overhaul U.S. trade policy. Raw-material costs have soared as a result of Trump’s tariffs on imported steel and aluminum, with Ford saying it absorbed a $1 billion hit because of the president’s policies.

The new North American trade deal with Mexico and Canada includes sourcing requirements that will complicate industry supply chains, and the president also is considering imposing 25 percent tariffs on imported vehicles, a policy that would increase the cost of imported cars by an estimated $6,000 and eliminate 600,000 industry jobs, according to the American Automotive Policy Council.

Philip Levy, a White House economist in the George W. Bush administration, said the auto industry layoffs could prompt Trump to go ahead with additional trade barriers. “While he should take the GM move as a prompt to reconsider his approach, he seems much more inclined to double down reflexively,” Levy wrote in an email.

In Lordstown, workers planned to pray for a miraculous reversal of the company’s decision, according to David Green, president of United Auto Workers Local 1112.

“It’s like someone knocks the wind out of you,” he said of GM’s announcement. “You lose your breath for a minute.”

About 40 percent of the local’s members voted for Trump, Green said. Now workers want to see the president keep his promises, he said.

“He came to our community and said: ‘Don’t sell your house. These jobs are coming back,’ ” Green said. “We’ve seen nothing but job losses around here.”

Indeed, even before Monday’s announcement, Lordstown was bleeding jobs. Since Trump took office, GM has eliminated two shifts and roughly 3,000 jobs at the plant, according to John Russo, a visiting scholar at Georgetown University’s Kalmanovitz Initiative for Labor and the Working Poor.

Despite a lengthy period of economic growth, the unemployment rate in the area is 5.2 percent, well above the national 3.7 percent mark.

“The costs are going to be devastating,” Russo said of the latest layoffs. “This thing is going to ripple through the economy.”

Investors’ reaction to the news underscored the Wall Street-Main Street divide that the populist president has vowed to erase. Even as thousands of American families faced a holiday season without cheer, GM shareholders saw an immediate 4.8 percent gain in the value of their shares.

To be sure, GM’s action was largely a result of shifting consumer demand rather than a sudden, economywide deterioration. “GM is making a big bet on a future that is autonomous, connected and electric,” said Michelle Krebs, an analyst at Auto Trader. “It has to be extremely profitable now to finance that because no one knows when those vehicles will be commonplace.”

Roughly 1 million of the nation’s 150 million non-farm workers are employed in motor vehicle manufacturing, according to economist Jim O’Sullivan of High-Frequency Economics. That’s about as many vehicle production jobs as 10 years ago, when the total U.S. workforce was smaller.

The overall economy is still in good shape. Small businesses remain upbeat, and payrolls are expected to continue growing, O’Sullivan said.

But the economy’s growth rate, which slowed in the third quarter to 3.5 percent from 4.2 percent in the previous three months, is widely expected to continue decelerating. The boost from last year’s tax cut and increased government spending is fading, while uncertainties and costs associated with the president’s tariffs are mounting.

“Even though times are good and unemployment is low, businesses have a pretty sober outlook about planning for the future,” economist Michael Feroli of JPMorgan Chase said. “There is a little bit of hesitancy to go all-in right now with investment.”

Danielle Paquette and Damian Paletta contributed to this report.