President Trump on Tuesday rebuked and threatened General Motors, intensifying his attacks on an automaker whose planned layoffs run counter to the president’s promise to bring back U.S. manufacturing jobs.

Trump urged GM to reconsider its plans to lay off 15,000 workers and close five plants, writing on Twitter that he would evaluate cutting off federal subsidies to the automaker if it went forward.

“Very disappointed with General Motors and their CEO, Mary Barra, for closing plants in Ohio, Michigan and Maryland,” Trump wrote over the course of two posts. “Nothing being closed in Mexico & China. The U.S. saved General Motors, and this is the THANKS we get! We are now looking at cutting all @GM subsidies, including . . . for electric cars.”

The U.S. government offers financial incentives such as tax credits for buyers of electric cars as a way to make the products more attractive. Trump could not unilaterally cut off all federal aid to GM, because he would need support from Congress to scrap programs that help the automaker. The administration does have influence over certain federal grants and subsidies, though steering them away from GM could cause further layoffs.

The positions GM plans to eliminate are the kind of manufacturing jobs Trump promised as a presidential candidate to bring back — particularly in Rust Belt states such as Pennsylvania, Ohio, Michigan and Wisconsin that delivered him the White House.

As president, Trump has taken credit for a manufacturing renaissance, saying that blue-collar jobs were booming thanks to his tax cuts, the scrapping of environmental and labor regulations, and trade measures aimed at shielding domestic producers from foreign competitors.

Last year, he visited a part of Ohio near where one of the GM plants will soon be closing. He promised residents there that they were about to be in the midst of a big boom.

“They’re all coming back,” Trump said, referring to jobs in the Youngstown, Ohio, area. “They’re all coming back. Don’t move, don’t sell your house.”

Overall, Trump has presided over an uptick in manufacturing job growth.

Federal employment data shows the economy has added 416,000 manufacturing jobs since Trump took office in January 2017. In October, manufacturing employment grew 2.4 percent from a year earlier, matching July’s rate for the fastest annual growth recorded since the Great Recession.

During the Obama administration, that same rate never topped 1.9 percent.

But the increase in blue-collar jobs has been less pronounced in much of the Rust Belt.

Compared with current rates, Michigan and Ohio were adding factory jobs at a much faster clip in 2011, 2012 and even 2015, when they were making up ground lost in the Great Recession. Pennsylvania is growing more slowly than its peers, but its 1.4 percent growth is still its fastest annual rate since the recession.

Wisconsin bucks the trend. Factory employment grew at a rate of 4.9 percent from a year earlier in September — the fastest rate in the state since 1995.

White House officials say the national climb proves Trump’s economic agenda is working.

The U.S. economy grew at a strong 3.5 percent annual growth rate in the third quarter, and the unemployment rate is 3.7 percent — the lowest level in nearly 50 years.

“The economy, in my judgment, is very strong, very strong,” said White House National Economic Council Director Larry Kudlow. “I think the economy is in excellent shape quite apart from the disappointing news on GM.”

Trump in December signed a GOP tax law that slashed the corporate tax rate from 35 percent to 21 percent, and he said a revised trade deal between the United States, Mexico and Canada would make North America a “manufacturing powerhouse.”

But presidents have only a limited ability to affect the economy with their policies, and there are signs of trouble ahead.

Manufacturing job gains have been boosted by strong economic growth overall. But the U.S. economy has now expanded for almost 10 straight years, an unusually long stretch, and many economists expect the country to enter a more turbulent period.

The Federal Reserve is engaged in ongoing interest rate hikes, decisions aimed at unwinding the central bank’s efforts to grow the economy as it pivots toward preventing future inflation.

The economic stimulus from the GOP tax cuts and new federal spending is also expected to taper off soon, and the stock market has slid sharply in recent weeks amid fears that the economy has already reached its peak.

“There’s this desire to have a manufacturing renaissance, and then some stark realities,” said Scott Paul, president of the Alliance for American Manufacturing, an organization that represents companies and union workers. “One of them is that we’re obviously getting closer and closer to the end of the business cycle.”

Ford Motor, meanwhile, is in the midst of its own restructuring, and analysts suspect that it could announce a large batch of layoffs by the end of this year.

Trump has publicly criticized companies that lay off workers or move jobs out of the country.

He had a furious response to Harley-Davidson’s announcement this summer that it would move some of its U.S. production to another country. Trump later said he would try to tax Harley-Davidson into bankruptcy.

Kudlow called GM’s announcement “brutal, brutal” and hinted Trump would try to take action.

Stripping away this benefit for GM automobiles could hurt the company’s ability to sell these cars in the United States. If GM loses the tax credits, it could steer buyers toward manufacturers that still have these financial incentives.

“This is the opening round of what is probably going to be a 15-round match, and it’s hard to know how this thing is going to work out,” said David Cole, chairman emeritus of the Center for Automotive Research.

Democrats have pointed to Trump’s adversarial trade approach as one reason that some manufacturers are losing jobs. GM said new tariffs imposed on metals imports by Trump have added $1 billion to its costs, and Harley-Davidson cited the trade war between the United States and other countries as a factor in its decision to move some jobs overseas.

But a number of analysts said different parts of the manufacturing sector are going through cyclical shifts that tax cuts alone won’t solve. Manufacturing was in a decades-long decline before the 2008 financial crisis, having posted job losses that the dwarfed the gains of the current recovery. Even after nearly a decade of uninterrupted economic growth, manufacturing jobs are still down 35 percent since 1979.

In the 1950s, nearly a third of all jobs were in manufacturing. It’s now less than 1 in 10, according to Labor Department data.

Some of the jobs were eliminated by automation as employers replaced workers with machines. And many companies took advantage of international trade agreements to move factories overseas, where they could pay foreign workers lower wages while still selling goods to U.S. customers.

Trump has leveled tariffs on almost half of all imports from China, with a threat to follow through with additional penalties in a few months. That has done little, though, to reverse years of losing manufacturing jobs to Asia. The gap between imports and exports between the United States and China has worsened since he took office.

Promises for a big manufacturing revival were key to Trump’s 2016 election, as they helped score surprise wins in Wisconsin, Michigan, Ohio and Pennsylvania.

But his fellow Republicans struggled in some of those states in the 2018 midterm elections.

Wisconsin Gov. Scott Walker, a Republican, lost his bid for reelection earlier this month after committing $4 billion in taxpayer money to lure Taiwanese technology company Foxconn to the state. Foxconn promised it would create 13,000 jobs, but many voters are skeptical whether the deal will come together as promised. Michigan, meanwhile, elected its first Democratic governor since 2010, and Republicans lost several congressional seats in Pennsylvania.

The GOP grip on Ohio remained strong after the November elections, but GM’s announcement Monday that it would close its plant near Youngstown could fuel concerns that economic problems will worsen, not improve as they have been told.

“Automation has just eaten away at better-paying manufacturing jobs,” said Tod Porter, chair of the economics department at Youngstown State University. “Some of it’s international trade, but a lot of it is just productivity gains. The idea that those jobs were going to be rushing back in was just totally at odds with the trend over the last 60 years.”