Gold inched higher on Friday to trade below a more than six-month high hit earlier this week, 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.2 percent to $1,277.75 per ounce as of 0448 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 had hit its highest level since June 19 at $1,279.06 on Wednesday.
U.S. gold futures inched down 0.1 percent to $1,280.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.
SPDR Gold Trust, the world's largest gold-backed exchange-traded fund, said its holdings fell 0.30 percent to 787.67 tonnes on Thursday from 790.02 tonnes on Wednesday.
Among other precious metals, silver rose 0.1 percent to $15.22 per ounce and 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.