Gold prices rallied to six-year highs last week, as China has continued to boost its stockpile of the precious metal since December in a bid to move away from the dollar in the midst of the trade war with its major economic counterpart – the US.

The People’s Bank of China has purchased more than 70 tons of gold since December, according to the World Gold Council (WGC), marking a major shift as the official figures had remained unchanged from October 2016 to November 2018.

Other global central banks are also accumulating the precious metal in record numbers. Russia has been the top buyer of gold, adding about 274 tons to its reserves last year, while adding 78 tons of gold in the first 5 months of 2019 to its coffers, increasing the metal’s share in its international reserves by 3.7 percent, WGC reported.

Analysts say Beijing was doubling down on gold “to diversify its reserves” away from the dollar currency. The country has been selling off US Treasuries lately, with its holdings having plunged from a peak of $1.32 trillion in late 2013 to about $1.1 trillion in April.

“Beijing is worried US-China ties could get worse, so the PBOC has jumped to stockpile its gold reserves,” said Tom McGregor, Beijing-based journalist and political analyst, adding, “Gold is a safe haven investment.”

Gold has been “quietly” outperforming most G-10 currencies since the US-China trade war began, Scotiabank commodity strategist Nicky Shiels told Kitco News. He described the latest rally as a “standalone gold breakout” that excludes the metal’s usual direct correlation with the US dollar.

The trade dispute between China and the United States, which began last year after Donald Trump slapped 25-percent tariffs on $50 billion worth of Chinese goods ostensibly in a bid to fix what he called Beijing’s "unfair trade practices". Since then, the sides have exchanged several rounds of duties.