The stock market, which plunged following Trump’s haphazard announcement of steel and aluminum tariffs on Thursday, continued its descent Friday | Stephanie Keith/Getty Images US officials try to contain damage from Trump trade war declaration The announcement spooked investors, enraged allies and left pro-trade White House officials scrambling to change the president’s mind.

Officials inside the White House and the Treasury Department were trying on Friday to contain the fallout from President Donald Trump’s declaration of a trade war and to ensure that new levies are not imposed on all trading partners.

In an early-morning Twitter post, the president cast off decades of consensus that trade wars damage the U.S. economy and hurt more workers than they help, embracing a strategy that many scholars believe helped deepen and extend the Great Depression.

Trump tweeted that “trade wars are good, and easy to win.”

The announcement spooked investors, enraged U.S. allies and left pro-trade White House officials scrambling to limit the damage and change the president’s mind.

“I think by the time this is actually finished, there’s at least a chance it won’t look like it did on Thursday,” one senior administration official said Friday afternoon.

But the stock market, which plunged following Trump’s haphazard announcement of steel and aluminum tariffs on Thursday, continued its descent Friday. The Dow dropped over 300 points shortly after the opening bell on Wall Street, adding to a 420-point decline on Thursday.

Stocks recovered somewhat later in the day as traders hoped that by the time the tariffs become actual policy, they will be more targeted and spare major U.S. allies.

Trump’s trade war tweet came the morning after the president rebuked Treasury Secretary Steven Mnuchin and National Economic Council Director Gary Cohn, siding with economic nationalists in his administration and announcing plans to impose steep 25 percent tariffs on imported steel and 10 percent on imported aluminum.

The decision led Cohn, the former Goldman Sachs president viewed as the main check on Trump’s protectionist impulses, to threaten to resign, according to two people familiar with the situation. And it had Treasury officials scrambling to reassure U.S. allies while monitoring the market fallout.

One person close to Cohn said on Friday that the NEC director was at work in Washington and had a “smile on his face.”

The White House was quiet. Several meetings had been canceled, according to administration officials, and some staffers opted to work from home because of the federal government’s closure due to strong winds.

There was a sense among many administration officials that the White House was getting crushed on the president’s trade pronouncement — from the business community and Capitol Hill — and staying out of the office provided at least some respite.

“If you are in the office after what has happened the past few weeks, you are a sucker,” one White House official said. “I don’t have any answers. We have no papers. We have nothing.”

Another senior member of the economic team said they were in the dark about the policy.

“I don’t understand what we announced, I don’t know what the policy is,” this person said.

Only Peter Navarro, a White House trade adviser, and the Commerce Department appeared to be in the loop on the president’s decision. Commerce Secretary Wilbur Ross, a billionaire, took to CNBC on Friday morning to defend the policy, holding up soup and beverage cans to argue that the increase in consumer prices from the tariffs wouldn’t be so bad.

Still, it felt to many inside the administration as if the president had stirred up a potential trade war and then suddenly exited Washington on Friday to attend the funeral of Billy Graham in North Carolina before heading to his Mar-a-Lago estate in Florida.

The formal declaration of tariffs and Trump’s robust embrace of trade wars spooked investors who fear that while a few steel companies may benefit, consumers will face higher prices, trading partners will retaliate and manufacturers who rely on imported materials, including the auto industry, could suffer, perhaps severely.

“The idea that you can somehow win a trade battle by mutual impoverishment is just counter to economic consensus and decades of history,” said Scott Lincicome, a trade attorney and adjunct scholar at the Cato Institute. “Going back 100 years and even dating to the Civil War, you look at the academic analysis of protectionism and the results are pretty much uniformly the same. You have far more costs than benefits, and those costs are borne not just by consumers but by American companies and farmers and exporters.”

Immediate market reaction offered a snapshot into the potential fall-out from increased protectionism.

Shares in steel companies rose following Trump’s announcements, but shares in companies that use imported steel and aluminum — from automakers like Ford and GM to aerospace giants like Boeing — fell sharply.

American allies, including the European Union and Canada, immediately scorned Trump’s decision on steel and threatened retribution. Republicans on Capitol Hill also sharply rebuked the president.

“Kooky 18th-century protectionism will jack up prices on American families — and will prompt retaliation from other countries,” Sen. Ben Sasse (R-Neb.) said in a statement on Friday. “If the president goes through with this, it will kill American jobs — that’s what every trade war ultimately does. So much losing.”

The chaotic process that led to Trump’s tariff announcement also portrayed an increasingly isolated president — besieged by scandal and losing some of his most trusted aides — clinging to an issue hat he has pushed for years and that he believes helped him win the White House.

But to advisers including Cohn and Mnuchin, as well as Republicans across Capitol Hill and in corporate America, Trump’s decision to fully embrace protectionism threatens the two things actually going well in his presidency: a strengthening economy and rising stock market.

“His braggadocio about his effect on the stock market has been undercut by events of his own doing,” David Kotok, chief investment officer at Cumberland Advisers, wrote in a client note on Friday morning. “He is losing his staff. He is isolated and beleaguered. And in the midst of crisis he tosses an ill-thought-out bomb called protectionism that punches out the best of our allies and friends while it strengthens our nation’s adversaries.”

Cohn, Mnuchin and other free-trade advocates inside the White House argued for months that embracing tariffs and ripping up free-trade deals would threaten a stock market rally that Trump until recently loved to boast about. The president has come to view the stock market as a form of polling, according to two close White House advisers.

For a while, the market argument worked, helping keep the president from unilaterally ending the North American Free Trade agreement and a separate pact with South Korea.

But at least as of Friday, it appeared the argument no longer swayed the president. Trump issued his latest trade war tweets even after the sharp market decline on Thursday. And White House press secretary Sarah Huckabee Sanders on Friday morning said the president was not worried about the market declines.

“The president’s still focused on long-term economic fundamentals,” she said. “He is incredibly focused on the American worker. It’s something that we have to have and something we need to have.”

Business coalitions outside the steel industry on Friday were gearing up to see whether they could carve out exemptions to blunt the impact of the proposed tariffs by excluding NAFTA or NATO countries, according to one Republican lobbyist — or create exemptions for products not currently manufactured in the U.S.

Several Republican senators also made public statements in the past 24 hours blasting the president’s plan. Factions on the Hill hoped that would be effective again in changing Trump’s mind. When he threatened to pull out of NAFTA, several key lawmakers involved in trade reached out to the White House and directly to president to nudge him off the idea, and they had success.

But some White House officials worried they might not be able to talk Trump out of the tariffs idea. The policy process inside the White House broke down during this decision, and chief of staff John Kelly, although he has kept his job over the past few weeks, has been weakened.

“Given the president’s mood lately and how much he really believes in it, I think we are past that point,” one official said. “The process broke down on this one, and all of us feel like we’ve gone backwards.”