Spot gold crawled higher on Tuesday, paring post-ISM losses, as energy shares dragged benchmark U.S. indexes to session lows.
Spot gold was 0.3 percent higher at $1,292 an ounce after slipping as much as 0.4 percent earlier in the session. U.S. gold futures for December delivery settled $3.60 lower at $1,285.30 an ounce moments before stocks accelerated earlier losses.
Gold tread negative territory for most of the day as the dollar rallied after a report showed growth in the U.S. services sector hit a 8-1/2-year high in July, helped by increased business activity.
The Institute for Supply Management said its services index rose to 58.7 last month, the highest since December 2005, from 56.0 in June. The reading blew past economists' forecasts for 56.3, according to a Reuters survey.
The dollar came under some pressure on Tuesday from a fall in U.S. bond yields but it rose 0.3 percent, near a 10-1/2-month peak, after the service sector data.
Earlier, a separate report showed growth in China's service sector slowed sharply in July to its lowest level in nearly nine years, a private sector survey showed, hurting Asian stocks and boosting gold, which is seen as an alternative to riskier assets such as equities.
"While many geopolitical hotspots are on the boil, none have managed to keep any sort of bid underneath gold for long," INTL FCStone analyst Edward Meir said.