Gold extended its gains, climbing as much as 1.6% to surpass $4,140 an ounce, building on a 1.7% increase from the previous session. Silver also moved higher, nearing $60 an ounce. This upward movement was driven by dip-buyers, even as escalating tensions in the Middle East, particularly renewed hostilities between the US and Iran, created market pressure. The conflict has led to increased oil prices and concerns about energy-driven inflation, which could prompt the Federal Reserve to maintain a hawkish stance on interest rates.

Analysts note that gold has been struggling for direction, with central bank purchases providing support while exchange-traded funds (ETFs) have sold holdings due to fears of rate hikes. However, some analysts, including Amy Gower at Morgan Stanley, believe ETFs could re-enter the market if the Fed keeps rates on hold this year and begins cutting next year. Morgan Stanley forecasts gold at $4,450 an ounce and silver at $65.40 an ounce by the fourth quarter.

Despite the geopolitical tensions, buyers seem to have successfully held the $4,000 level for gold, with selling pressure fading. This is seen by Justin Lin, an analyst at Global X ETFs, as a potential breakout following reduced volatility. The momentum has attracted fresh inflows into exchange-traded funds, with total holdings rising by approximately 7.4 tons on Tuesday, marking the highest daily inflow in over a month. Money managers have also increased their bullish gold bets, adding 4,293 net-long positions to reach 119,147, according to CFTC data.

The current environment presents a complex picture for gold. Traders are balancing the impact of higher energy prices against soft US economic data to gauge the Fed's future interest rate path. Elevated borrowing costs typically act as a headwind for non-yielding bullion. While the US-Iran conflict previously ended a multiyear bull run for gold, causing it to fall roughly a quarter from its January peak of nearly $5,600 an ounce, the recent gains suggest a resilience in the market driven by sustained buying interest.