Palladium shot to an all-time high as Russia's invasion of Ukraine and resultant sanctions stoked fear of scarcity, while gold tested the psychological $2,000 mark in response to demand for safe-haven assets.

Spot palladium was up 10.2% at $3,308.49 per ounce by 1216 GMT, on course for its biggest daily percentage rise since March 2020 having hit an all-time high of $3,440.76 earlier.

"Palladium is reflecting deep scarcity, and anticipation of further scarcity as things unfold in Ukraine and Russia," independent analyst Ross Norman said, adding he expected the price rally to continue.

Western nations have piled sanctions on Moscow, driving prices higher across a range of commodities. Russia accounts for 40% of global production of palladium, used by automakers in catalytic converters to curb emissions.

"Possible supply outages from Russia are still being priced in on the palladium market," Commerzbank analysts said in a note. "As supply outages could not be offset elsewhere, the market risks sliding into a sizeable supply deficit."

Spot gold gained 1% to $1,988.46 per ounce, after scaling its highest since Aug. 19, 2020 at $2,002.31 earlier in the session. U.S. gold futures rose 1.3% to $1,991.30.

"The severity of the war in Ukraine and the uncertainty around its future trajectory have fuelled broad-based gold buying from safe-haven seekers, pushing prices towards $2,000 per ounce," Julius Baer analyst Carsten Menke wrote in a note.

"A further escalation would likely lift prices further. The latter would likely have a more lasting impact, as it could push the world economy towards a stagflation scenario, which we see as very bullish for gold."

Bullion is considered a safe store of value during such uncertainties and also a hedge against rising inflation.

"In the current environment, I would expect $2,000 to represent little more than a speed bump," Norman said.

Silver gained 0.3% to $25.74, while platinum was up 2% to $1,143.08.