Spot gold rose 1.3% at $3,428.10 an ounce as of 1.49pm EDT (1749 GMT), coming within striking distance of its record high of $3,500.05 set in April. Prices gained about 4% so far this week.
US gold futures settled 1.5% higher at $3,452.80.
"Israel knocking out Iranian targets is causing a little bit of geopolitical scare in the market. Prices will stay elevated in the anticipation of what is to come, the retaliation by Iran," said Daniel Pavilonis, senior market strategist at RJO Futures.
Israel launched a barrage of strikes across Iran on Friday, saying it had attacked nuclear facilities and missile factories and killed military commanders in what could be a prolonged operation to prevent Tehran from building an atomic weapon.
US President Donald Trump suggested that Iran had brought the attack on itself by resisting a US ultimatum in talks to restrict its nuclear program.
Softer US inflation prints earlier this week added extra shine to gold, bolstering expectations of interest rate cuts by the Federal Reserve.
Bullion is widely regarded as a safe asset, especially during times of economic turmoil and geopolitical unrest. It also tends to thrive in a low-interest-rate environment.
Goldman Sachs reiterated its forecast that structurally strong central bank buying will raise the gold price to $3,700/toz by end-2025 and $4,000 by mid-2026. BofA sees a path for gold to rally to $4,000/oz over the next 12 months.
On the physical front, demand in major Asian hubs weakened this week as rates soared, with prices in India zooming past the psychologically important 100,000-rupee mark.
Spot silver eased 0.3% at $36.27 per ounce, gaining 0.9% for the week.
Platinum fell 5.9% to $1,219.03 and was up 4.8% for the week. Palladium shed 1.3% to $1,041.51 and dropped 1.1% so far this week.
Stocks fell across the board Friday after more clashes in the Middle East, with the Dow dropping about 1.8%, the S&P 500 more than 1% and the Nasdaq declining 1.3%.
Reuters