Gold turned slightly lower on Friday as the dollar shifted higher on encouraging U.S. data and as investors weighed the impact of China's currency intervention on the timing for the first U.S. interest rate increase in nearly a decade.
U.S. industrial output advanced at its strongest pace in eight months in July as auto production surged, another bullish sign for third-quarter economic growth that boosted the prospects of a Federal Reserve interest rate hike next month.
hovered around $1,114 an ounce after hitting $1,126.31 on Thursday, its highest since July 20.
U.S. gold for December delivery settled down 0.3 percent at $1,112.70 an ounce.
The precious metals complex moved in the opposite direction of U.S. crude oil, which turned higher after reaching a 6-1/2-year low.
"I think there were allocation shifts in the market today," said Phillip Streible, senior market strategist at RJO Futures in Chicago, explaining that it appeared some investors re-allocated their money to oil from precious metals.
Spot silver saw deeper losses of 1.7 percent to a session low of $15.15 an ounce.
Despite the day's turn lower, gold bullion was set to end a seven-week losing streak after China's yuan devaluation increased uncertainty over the global economy, and pushed investors into assets perceived as safer such as gold.
"The market was caught by surprise by the Chinese currency devaluation and there was some safe-haven buying but physical demand is still not strong and only a test of the $1,110 could change that," MKS SA head of trading Afshin Nabavi said.
Volatile markets were soothed as the yuan steadied after China's central bank said there was no reason for the currency to fall further given the country's strong economic fundamentals.
The precious metal has gained nearly 2 percent in the week so far, after a seven-week slide that was its longest retreat since 1999.
China's gold reserves rose to 53.93 million ounces by the end of July, up from 53.32 million at end-June, the central bank said. The data was released following a June adjustment that was the first in more than six years.
China's gold demand this year is expected to at least hold steady with last year at just under 1,000 tonnes, the World Gold Council said.