The price of Brent crude oil, an international benchmark, touched a seven-year high of more than $99 (£73) a barrel after President Vladimir Putin ordered troops into Ukraine's east.
But prices later moderated, despite Western countries responding with economic sanctions and moves to block a key Russian gas pipeline.
Shares also stemmed early losses.
After falling more than 1.5% in early trade on Tuesday, Wall Street turned up following remarks by US President Joe Biden outlining the US response. The Dow closed down 1.4%, however, while the wider S&P 500 slumped 1% and the Nasdaq fell 1.2%.
Earlier, Japan's Nikkei 225 index closed 1.7% lower, and the Shanghai Composite fell nearly 1%, but share indexes in Europe and the UK ended roughly flat, with the FTSE 100 closing up 0.1%.
"The West at the moment is treading fairly carefully," said Russ Mould, investment director at the brokers AJ Bell.
Pain at the pump
Russia is the second-largest oil exporter after Saudi Arabia and the world's top producer of natural gas.
Measures forcing the country to supply less crude or natural gas would have "substantial implications" on oil prices and the global economy, said Sue Trinh of Manulife Investment Management.
The RAC warned the crisis would push up UK petrol prices further, after they hit a record 149.12p a litre on Sunday.
"Russia's decision to invade Ukraine is already causing oil prices to rise and will undoubtedly send fuel prices inexorably higher towards the grim milestone of £1.50 a litre [of unleaded petrol]," said RAC fuel spokesman Simon Williams.
"This spells bad news for drivers in the UK struggling to afford to put fuel in their cars."
But the steps announced by the US, UK and Europe so far fall short of what had been threatened in the event of invasion.
The sanctions target financial institutions, elites and other government entities in Russia, in part aiming to restrict the Russian government's ability to raise money on Western financial markets.
On Tuesday, German Chancellor Olaf Scholz also took the significant step of blocking the certification of the Nord Stream 2 pipeline that would have supplied gas directly from Russia to Germany.
"If Russian goes further with this invasion, we stand prepared to go further," US President Joe Biden said in remarks at the White House.
He also warned that defending Nato territory could come at a cost to the public in the form of higher energy prices.