Gold edged up in seesaw trade on Tuesday as concerns over a fresh coronavirus outbreak in China countered pressure from a surge in Wall Street driven by a record rise in U.S. retail sales and optimism over a COVID-19 drug.
Spot gold rose 0.09 % to $1,726.17 per ounce. U.S. gold futures settled 0.5% up at $1,736.50.
Raising concerns over the pandemic, Beijing's city government on Tuesday raised its COVID-19 emergency response level to II from III, according to state media.
"Gold is gaining after Beijing suddenly tightened the measures, with schools shut and people advised not to leave the city unless necessary," said Alex Turro, market strategist at RJO Futures.
Driving initial declines in safe-haven gold, Wall Street surged after a Commerce Department report showed overall retail receipts rose 17.7% last month, the biggest advance on record.
Equities also found support from data showing reduced COVID-19 death rates in a trial of a generic steroid drug.
"Every time the (gold) price falls, it seems that investors are seeing it as a buying opportunity," ActivTrades chief analyst Carlo Alberto De Casa said in a note.
Global coronavirus cases reached more than 8 million on Monday, as infections surged in Latin America and the United States.
The fundamentals for gold are strong, given the low interest rates environment and uncertainty over the pandemic, RJO Futures' Bob Haberkorn said.
Adding to a list of global central bank stimulus measures, the Bank of Japan said it expected to pump around 110 trillion yen ($1 trillion) via its market operations and lending facilities.
Lower interest rates reduce the opportunity cost of holding non-yielding bullion.
Palladium gained 0.7% to $1,921.33 per ounce, having earlier hit its highest since June 10 at $1,965.21, while platinum rose nearly 1% to $819.22.
Silver was little changed at $17.42.