Gold steadied on Wednesday, holding just below the key $1,300 level, as global stocks retreated, pointing to reduced appetite for riskier assets while investors awaited clarity on the U.S.-China trade front.
Spot gold was up 0.1% at $1,298.26 per ounce, having hit its highest level since April 11 at $1,303.26 on Tuesday.
U.S. gold futures settled $1.50 higher at $1,297.80.
"There have been flows out of equities into safe havens," said Quantitative Commodity Research analyst Peter Fertig, adding stocks turned back into the red, despite strong economic data from Germany.
The euro zone's biggest economy, Germany rebounded in the first quarter, growing 0.4% after zero growth in the previous three months.
A global equity bounce stemming from softer rhetoric by U.S. President Donald Trump on the trade dispute with China waned on Wednesday as grim Chinese data and fresh Italian debt woes cast a shadow over global markets.
The softer rhetoric from Washington and Beijing, has in part limited gold's gains.
"As long as there is no decision made that there will be no further imports duties on Chinese goods, you cannot say the worst is over," Fertig said, adding there is also concern in the wider financial markets that the trade spat could further weigh on the Chinese, and in turn, global economy.
Data from China showed weak retail sales and industrial output growth weighed on markets and added pressure on Beijing to roll out more stimulus.
Tensions in the Middle East have also been supportive for gold, said Afshin Nabavi, senior vice president at MKS SA.
Saudi Arabia said armed drones struck two of its oil pumping stations on Tuesday, two days after the sabotage of oil tankers near the United Arab Emirates, and the U.S. military said it was braced for "possibly imminent threats to U.S. forces in Iraq" from Iran-backed forces.
Gold is considered a safe store of value in times of political or economic uncertainties.
On the technical front, the $1,300 barrier will prove a crucial pivot for bullion, analysts said.
"Gold market looks to be rangebound around $1,292 on the downside and $1,300 on the upside. If we break above $1,300, we can see prices rally up to $1,310," Nabavi added.
Among other precious metals, silver rose 0.2% to $14.82 an ounce, while platinum fell 0.5% to $851.60.