Gold climbed to a more than six-month high on Friday, as concerns about slowing global economic growth and a partial government shutdown in the United States stoked safe-haven demand, although gains in equities capped the upside.
Spot gold had risen by 0.5 percent to $1,281.08 per ounce as of 0713 GMT, and was set for a second straight weekly gain with no end in sight for China-U.S. trade tensions and political uncertainty in the United States.
The precious metal hit its highest level since June 19 at $1,281.39 earlier in the session.
U.S. gold futures inched up 0.2 percent to $1,283.2 per ounce on Friday.
"People see gold as the only safe haven at this point of time," said Brian Lan, managing director at dealer GoldSilver Central in Singapore, referring to political and economic upheavals such as the Sino-U.S. trade spat and the partial U.S. government shutdown.
The dollar index, a gauge of its value versus six major peers, edged lower, having lost 0.5 percent overnight, adding to gold's appeal by making it cheaper for holders of other currencies.
Financial markets are expecting U.S. growth to slow next year as a result of rising interest rates. A measure of U.S. consumer confidence posted its sharpest decline in more than three years in December, emphasizing the possibility.
In a blow to worsening trade tensions between the world's two biggest economies, U.S. President Donald Trump is considering an executive order that would bar U.S. companies from using telecommunications equipment made by China's Huawei and ZTE.
Gold is often used by investors as a hedge against political and financial uncertainty.
Meanwhile, Asian stocks inched higher after Wall Street ended volatile trade in the green in the previous session, limiting gold's advance.
High volatility in equities has benefited gold, said Vandana Bharti, assistant vice-president of commodity research at SMC Comtrade Ltd, adding that the metal saw good resistance at $1,272 after which it surged.
SPDR Gold Trust, the world's largest gold-backed exchange-traded fund, said its holdings fell 0.30 percent to 787.67 tons on Thursday from 790.02 tons on Wednesday.
Among other precious metals, silver rose to a near five-month high at $15.342 per ounce and was last up nearly 1 percent at $15.34. The metal was on track for its best week since Aug 2017.
"It is the end of the year. Investors are looking to rebalance their portfolio, so they allocate a bit (of their funds) to precious metals, even silver," Lan said.
Platinum rose 0.1 percent to $796.74 per ounce, while palladium dipped 0.8 percent to $1,264.90. Palladium has gained about 3 percent this week.
(Reporting by Karthika Suresh Namboothiri in Bengaluru; Editing by Subhranshu Sahu)