Donald Trump’s tweets are keeping global financial markets on edge, and many investors are opting for gold as a refuge.

Gold open interest, a tally of outstanding futures contracts, surged the most since mid-2016 on Monday to the highest in more than seven weeks. Prices of the metal have advanced amid escalating tensions in the Middle East and between the U.S. and China. The rebound comes after bullion slid in the past three months, partly under pressure from gains in the dollar and equities.

“There’s been a change in attitude: there’s safe-harbor buying” in gold, said Peter Thomas, a senior vice president at Chicago-based broker Zaner Group. After the recent price retreat, “we saw a lot of people buying gold again.”

On Tuesday, markets steadied as investors assessed the U.S.-China trade war, with the world’s biggest economies planning more tit-for-tat tariffs. Gold futures for June delivery slipped 0.3% to $1,298 an ounce at 10:23 a.m. on the Comex in New York, after reaching $1,304.20, the highest since April 11.

“The dollar is back in green and this has pushed the gold price lower, but I think this is only temporary because investors are largely concerned about the trade-war issue,” Naeem Aslam, chief market analyst at ThinkMarkets, said in an email. “Any pull back could be an opportunity to buy.”

This article provided by Bloomberg News.