Just what the fragile global economy didn’t need: An unpredictable escalation in President Donald Trump’s trade war with China, one that spreads the conflict to currency markets, threatens to involve other countries and raises the risk of a global recession.

At a time when growth in the United States and the world is already weakening and Trump has said he’ll impose new taxes on hundreds of billions of dollars of Chinese imports, Beijing is halting purchases of U.S. farm goods and the two sides are trading punches over the value of the U.S. dollar against the Chinese yuan.

The heightened hostilities could hobble world economic growth by depressing financial markets, discouraging trade and elevating uncertainty for businesses trying to decide whether and where to situate factories, buy supplies and sell products.

When companies across the world lose confidence or certainty about global trade policies, they tend to postpone plans to invest, expand and hire. Spread across the global economy and over time, those trends can trigger a severe economic downturn.

“President Trump is playing with fire here, and recession risks are very high,” said Mark Zandi, chief economist at Moody’s Analytics.

Barely a month ago, Trump and President Xi Jinping had announced a truce in their rancorous dispute over allegations that Beijing steals and forces foreign companies to hand over trade secrets, unfairly subsidizes Chinese companies and engages in cyber-theft of intellectual property.

The cease-fire broke last week when Trump, professing frustration that 12 rounds of negotiations had failed to break the impasse, said he would impose tariffs Sept. 1 on the $300 billion of Chinese imports that he’d previously left untouched.

On Monday, China hit back. It revealed that it had stopped buying U.S. farm products — a severe blow to Trump supporters in rural America. Beijing’s central bank also allowed the yuan to sink to an 11-year low against the dollar.

The fall of the yuan drew fire from Trump, who accused China of allowing it to give its exporters an unfair price advantage. On Monday evening, the Treasury Department declared China a currency manipulator for the first time since 1994.

The rapid-fire sequence of events “shatters confidence, trust and expectations,” said Sung Won Sohn, an economist at Loyola Marymount University in California. World stock markets tumbled Monday — the Dow Jones Industrial Average lost 767 points or 2.9% — before rebounding Tuesday on signs that China was stabilizing the yuan.

Despite Tuesday’s respite, the prospects for a trade deal, which appeared bright as recently as mid-May, have dimmed to near-invisibility.

“They are all moving in the wrong directions,” Sohn said. “I don’t think the Chinese are looking for a trade deal during the current term of President Trump. They have decided he is too unpredictable to negotiate with.”

The world economy hardly needs the strain. The International Monetary Fund, the World Bank and other forecasters have all downgraded their forecasts for global growth this year.

It isn’t just the trade war. Manufacturers around the world have allowed their inventories to build up and now are slowing production to bring their stockpiles closer to customers’ demand. J.P.Morgan’s global manufacturing index fell in July for the third straight month to the lowest level since 2012. Moody’s Investors Service predicts that global auto sales will drop 3.8% this year.

The prospect that Britain will leave the European Union without a trade deal — a risk that seemed to rise after Boris Johnson became prime minister last month — is imperiling Europe’s economic prospects.

Japan is preparing to raise its consumption tax in October, threatening to stifle an economy that’s already gasping for growth.

“The timing could not be worse,” said Paul Sheard, senior fellow at Harvard University’s Kennedy School. “Japan is the third-largest economy in the world.”

Trump’s decision to impose tariffs on foreign steel, aluminum, dishwashers, solar panels and hundreds of Chinese imports — and the retaliation it’s drawn from other countries — has chilled global trade investment. Companies are waiting to see whether and how the disputes work out.

“There are considerable downside risks with an escalation of protectionism,” said Sara Johnson, executive director of global economics at the research firm IHS Markit. “We’re disrupting supply chains, and tariffs ultimately lead to less efficient global production.”

Oxford Economics says business pessimism has risen sharply: 56% of the companies it surveyed July 12-Aug. 1 said the risk of a sharp global slowdown has risen, up from 32% in the spring.

“Once you lose economic confidence, it takes a very long time to build it back up,” said Harry Broadman, chair of Berkeley Research Group’s emerging markets practice and a former White House economic adviser.

The tit-for-tat exchange Monday over China’s currency brought a new, dangerous element into the mix.

“We haven’t been on this terrain since the 1930s,” said Joe Brusuelas, chief economist at the consultancy RSM.

Trump has made clear he wants to see the U.S. dollar drop against the yuan, the euro and other currencies. That’s one reason he’s applied relentless pressure to the Federal Reserve to cut U.S. interest rates — a move that tends to drive the dollar lower. (The Fed last week cut its key interest rate for first time in a decade.)

“The president has signaled that he has no problem with a weaker dollar,” said Joe Manimbo, senior market analyst at Western Union Business Solutions. “This is certainly unprecedented in modern times.”

Turning a trade war into a currency war heightens the danger. It shifts the battlefield to currency markets, where policymakers have much less control.

“Currency wars take on a life of their own,” Brusuelas said.

In the 1997-1998 Asian financial crisis, traders dumped Asian currencies and delivered devastating recessions to Thailand, Indonesia and South Korea, where borrowers struggled to repay U.S. dollar-denominated loans and left local banks drowning in bad debt.

Indeed, a dollar-versus-yuan fight is unlikely to remain confined to the United States and China. If other countries see Chinese or U.S. exporters gaining a currency advantage, they’ll feel pressure to respond by pushing their currencies lower, too.

“The idea that the U.S. is going to be able to engage in dollar devaluation that adversely impacts (the yuan) without adversely impacting other trading partners is sheer fantasy,” Brusuelas said. “Currency wars are guaranteed not to stay two-party affairs.”

In the past, the notion that the United States might intervene in the markets, buying foreign currencies and pushing down the dollar to gain an advantage, would have been farfetched.

“We’re in a new ballgame here,” Sheard said. “The old rules are not necessarily going to be respected anymore.”

© The Associated Press. All rights reserved.