Gold inched lower on Friday as the dollar rebounded but the metal was on track for a weekly gain as risk appetite waned on fears of a possible slowdown in global growth.
Spot gold edged 0.1 percent lower to $1,259.01 per ounce at 11:28 a.m. EST (1628 GMT), after nearly hitting a six-month high of $1,266.40 on Thursday.
The metal was, however, on course for a weekly gain of about 1.7 percent.
US gold futures fell 0.4 percent to $1,262.50 per ounce.
"We've bounced up against a resistance here, around $1,260-65, so it seems like a firm ceiling here," said Bart Melek, head of commodity strategies at TD Securities. "Part of the downside is because we failed to break above that level and at the same time, we had a bit of an increase in the dollar."
Keeping gold's momentum in check was the dollar, which reversed most of its losses after the US Federal Reserve earlier this week flagged fewer interest rate hikes, and investors sought the greenback's safety on worries about a possible US government shutdown.
Fears of a shutdown also compounded worries in stock markets, which extended a week-long sell-off, prompting some safe-haven inflows into bullion.
"The corollary here is that the market is still on US monetary policy," Melek said. "As we move into 2019, given that there is certainly some negative dynamics in the real economy, traders could decide that the Fed is likely to relent and not be as committed to its stated hikes."
US President Donald Trump indicated he was prepared to close down the government "for a very long time" if the Senate did not cater to his $5 billion demand to fund a border wall with Mexico.
"It's still a very keen risk-off mentality in the world marketplace heading into the weekend and into the Christmas holiday next week," Kitco Metals senior analyst Jim Wyckoff wrote in a note.
Holdings of the SPDR Gold Trust GLD, the world's largest gold-backed exchange-traded fund, slipped 0.3 percent on Thursday, after reaching a four-month high earlier this week. [GOL/ETF]
Palladium slid 2.4 percent to $1,234.29.
Silver dipped 0.5 percent to $14.69, but has gained about 0.8 percent so far this week.Platinum rose 0.3 percent to $795.60, and was headed for its first weekly gain in seven.