Gold prices firmed on Wednesday as geopolitical turmoil in the Middle East spurred safe-haven demand, but fading U.S. rate cut hopes capped further upside.

Spot gold rose 0.4% to $2,391.10 per ounce, as of 9:40 a.m. ET (1340 GMT). Prices hit an all-time high of $2,431.29 on Friday.

U.S. gold futures fell 0.1% to $2,405.40.

"Geopolitical uncertainty continues to support gold and if there is any escalation in the situation, then prices could move towards the $2,500 range," said Phillip Streible, chief market strategist at Blue Line Futures in Chicago.

"Gold prices will only come lower if central banks stop buying or if investors go back to a risk-on phase," he said.

Iran said its military was ready to confront any attack by Israel. Iran carried out its first-ever direct attack on Israel last weekend in retaliation for a suspected Israeli strike on an Iranian diplomatic compound in Damascus on April 1.

Top U.S. central bank officials including Federal Reserve Chair Jerome Powell backed away on Tuesday from providing any guidance on when interest rates may be cut, saying instead that monetary policy needs to be restrictive for longer.

The market is pricing in a 67% chance of a U.S. rate cut by September. Higher interest rates reduce the appeal of holding non-yielding gold.

While gold has largely remained uncorrelated with the U.S. dollar and Treasury yields in the current trend, it may still show short-term responses to movements in both, said FXTM senior research analyst Lukman Otunuga.

Spot silver rose 1.8% to $28.60.

The global silver deficit is expected to rise by 17% to 215.3 million troy ounces in 2024 due to a 2% growth in demand led by robust industrial consumption and a 1% fall in total supply, the Silver Institute said.

Spot platinum fell 0.3% to $953.75 and palladium firmed 1.7% at $1,031.00.

(Reporting by Ashitha Shivaprasad and Harshit Verma in Bengaluru; Editing by Vijay Kishore)