(Bloomberg) -- Explore what’s moving the global economy in the new season of the Stephanomics podcast. Subscribe via Apple Podcast, Spotify or Pocket Cast.

Foreign direct investment into China jumped last year to $139 billion even as trade tensions escalated, bucking a trend that saw global flows sink 13% from 2017 levels.

While global foreign direct investment declined to $1.3 trillion last year, inflows into China rose 3.7% from 2017, according to a report Wednesday from the United Nations Economic and Social Commission for Asia and the Pacific. The report also showed that for the fist time, Asia-Pacific was both the largest destination and source of foreign direct investment globally, with China remaining the biggest recipient of inflows despite the trade war with the U.S.

China was the biggest FDI recipient for the third consecutive year, but the report warned that a slowdown may be on the horizon.

“As it takes time for businesses to diversify their capacity outside of China in order to respond to the trade tensions, the longer the trade war between the United States and China continues, the higher the probability that there will be a slowdown in inward FDI,” the report said.

The report also cautioned that sluggish growth in inward greenfield investment may hamper Asia-Pacific’s ability to maintain such levels of investment in the near term.

“A decline in investment flows in 2020 is expected if both the uncertainty related to international trade continues and companies consolidate their value chains,” the report said. “Investment prospects for the region remain tied to unfolding risks of ongoing global political and economic disturbances.”

To contact the reporter on this story: Karlis Salna in Jakarta at ksalna@bloomberg.net

To contact the editors responsible for this story: Nasreen Seria at nseria@bloomberg.net, Michael S. Arnold, Jiyeun Lee

©2019 Bloomberg L.P.