(Bloomberg) -- A volatile week ended in favor of gold investors, with geopolitical tensions reigniting haven demand for the metal.

Hedge funds and other large speculators boosted their their bullish bets on bullion to the highest since September. While prices hit the highest in six years earlier in the week, the rally stalled as the risk of war between Iran and the U.S. faded. On Friday, President Trump announced sanctions against the Islamic republic, reminding investors the conflict is far from over.

“An escalation in geopolitical risks, especially over short periods, could send investors into gold and the USD simultaneously,” James Steel, chief precious metals analyst at HSBC Securities (USA) Inc., said in a note Friday. “This is precisely the climate that benefits gold, even if the U.S. dollar also becomes highly sought.”

Gold futures rose rose for a third straight week on Friday after the sanctions strengthened the case for owning gold as a hedge. The announcement came just two days after Trump said the Islamic republic is “standing down,” easing market anxiety.

Read more: Gold Surges as New U.S. Sanctions on Iran Show ‘This Isn’t Over’

“While we expected price momentum to build at the start of the new year, the rally has been stronger than expected amid escalating uncertainty,” Standard Chartered Bank analysts including Suki Cooper said in a note to clients this week.

HSBC raised its 2020 forecast on gold prices Friday to $1,613 an ounce from $1,560.

In the week ended Jan. 7, money managers’ bullish bets rose 4.7% to 299,814 futures and options, according to data released Friday by U.S. Commodity Futures Trading Commission. That’s the most since Sept. 24. The increase also took the so-called net-long position to the highest since late September.

To contact the reporter on this story: Justina Vasquez in New York at jvasquez57@bloomberg.net

To contact the editors responsible for this story: Luzi Ann Javier at ljavier@bloomberg.net, Joe Richter

©2020 Bloomberg L.P.