Spot gold hit $1,339.47 on Monday, its highest since Sept. 27 last year, a time when the metal was benefiting from a surge of interest following Britain's vote to leave the European Union.

Prices of the precious metal used as a hedge against political and financial turmoil are up more than 7 percent this quarter and more than 16 percent this year.

Investor interest can be seen in the holdings of physically-backed exchange traded funds, which at 54.757 million ounces are up more than three percent since Aug. 8.

North Korea on Sunday conducted its sixth and most powerful nuclear test, which it said was of an advanced hydrogen bomb for a long-range missile, prompting the threat of a "massive" military response from the United States if it or its allies were threatened.

"The war risk helped gold and it has been bid because of the weaker dollar," said Andrew Cole, a fund manager at Pictet Asset Management, adding he saw "further upside".

Cole said Pictet's Dynamic Asset Allocation Fund with nearly $590 million under management has four percent of its holdings in physical gold and 3.5 percent in gold mining stocks.

The U.S. currency against a basket of other major currencies recently fell towards 90, to its lowest since January 2015, largely due to speculation the Federal Reserve is unlikely to raise interest rates as quickly as anticipated. [FED/R]

That made dollar-denominated gold cheaper for holders of other currencies; a relationship used by funds to generate buy and sell signals from mathematical models. [FRX/]

"We've had uncertainty related to (U.S. President Donald) Trump's inability to pass his growth-friendly policies and the Fed seem to be more dovish," Ole Hansen, head of commodity strategy at Saxo Bank, said.

The idea that heightened security risks are behind rising demand for gold is highlighted by its relationship with silver, which because of its lower liquidity typically tends to move in a wider range than gold.

"Silver has not managed to outperform gold, which is what we normally see when precious metals rally. That tells me gold demand is safe-haven demand for diversification," Saxo Bank's Hansen said.

"Gold positioning is bullish. The ratio of longs to shorts is at its highest since late 2012, for every short there are 19 long positions."

On COMEX, speculators raised their net long gold positions for the 7th week running in the week to Aug. 29 to 231,896 contracts, the highest since September last year.

Also reinforcing gold is loose monetary policy in many parts of the world.

"There is a general unease about the management of currencies and the role central banks have played in that," Pictet's Cole said. "Look at bitcoin, an alternative currency, gold fits into that bill."

On the technical front, analysts say, North Korea's missile tests helped gold to break decisively through the $1,300 an ounce triple-top resistance, which now serves as support.

Upside barriers include $1,352, near last September's high, followed by $1,376, the upper Bollinger band on the monthly charts. However, the momentum indicator near zero suggests gold could be in for a period of consolidation.

(Reporting by Pratima Desai; Editing by Mark Potter)

By Pratima Desai