NEW YORK (AP) — Ciao, foreign stocks.

Spooked by the threat of a global trade war, U.S. investors withdrew nearly $10 billion from international stock funds last month, according to Morningstar. The last time that much money left the group was in 2008, when the global economy was in the throes of the Great Recession.

Investor flows into international stock funds have been diminishing since the start of this year, when they hit nearly $42 billion, their highest level since the spring of 2015.

It's a sharp turnaround from prior years, when investors were eager to snap up foreign stocks and diversify their holdings away from U.S.-heavy portfolios. Stocks abroad looked like more sensible purchases, the thinking went, because their prices were cheaper than U.S. stocks, relative to the profits they were producing.

In addition, stimulus from central banks was helping to lift economic growth around the world.

But many foreign markets have tailed off this year on worries that tough talk from Washington will lead to more barriers to global trade. The concerns stretch from the two nearest U.S. trading partners, Mexico and Canada, out to Europe and Asia.

Emerging-market stocks have been dropping steadily since early March, when President Donald Trump said that “trade wars are good” and “easy to win.”

Investors are particularly concerned about companies from emerging economies, such as China, Brazil and Turkey.

Roughly $8 billion of last month's withdrawals were due to investors pulling out of emerging-market stock funds alone.

Also hurting emerging markets is the drop in their currency values against the U.S. dollar. That makes it more difficult to repay debt denominated in dollars.

Making things more volatile is the uncertainty of how much pain a trade war will actually cause.

Investors have been flipping back and forth between thinking the sides will settle their differences or engage in a punishing, escalating match of tariffs that undercuts profits and growth. In the latest ebb, U.S. and European leaders on Wednesday agreed to hold off on new tariffs, which raised some cautious optimism.