Oil prices jumped by 4% on Monday on concerns that the situation in Israel and Gaza could disrupt output from the Middle East.
West Texas Intermediate (WTI), the benchmark for US oil, rose to more than $86 (£70) a barrel.
The price of Brent crude also surged in early Asian trading.
The Israel and Palestinian territories are not oil producers. But the Middle Eastern region accounts for almost a third of global supply.
A wave of attacks launched by the Hamas militant group on Saturday was the biggest escalation between the two sides for decades.
Western nations condemned the attacks but a spokesperson for Hamas told the BBC that the group had direct backing for the attack from Iran.
Iran denied involvement in the attack at at UN Security Council meeting in New York on Sunday, Reuters reported. But Iranian President Ebrahim Raisi has expressed support for the attack.
“The risk premium on oil is rising due to the prospect of a wider conflagration that could spread to nearby major oil producing nations such as Iran and Saudi Arabia,” energy analyst Saul Kavonic told the BBC.
“If the conflict envelops Iran, which has been accused of supporting the Hamas attacks, up to 3% of global oil supply is at risk,” he added.
Around a fifth of global supply would be “held hostage”, Mr Kavonic said, if passage through the Strait of Hormuz, a vital oil trading route is disrupted.
The Strait of Hormuz is crucial for the main oil exporters in the Gulf region, whose economies are built around oil and gas production.
Uncertainty over how events could develop in the coming days may also drive investments into US Treasury bonds and the dollar – which investors traditionally bought at times of crisis, said James Cheo from HSBC bank.
“At this stage, there is a bit of nervousness. [Investors] want to see a little more clarity, particularly on economic data and on developments associated with geopolitical uncertainty,” added Mr Cheo, the Southeast Asia and India chief investment officer of the bank’s private banking and wealth management division.
Following Russia’s invasion of Ukraine in February 2022, oil prices soared, hitting more than $120 a barrel in June last year.
They fell back to a little above $70 a barrel in May this year, but have steadily risen since then as producers have tried to restrict output to support the market.
Saudi Arabia, a major oil producer, said it would make cuts of million barrels per day in July.
Other members of Opec+, a group of oil-producing countries, also agreed to continued cuts in production in an attempt to shore up flagging prices.
Opec+ accounts for around 40% of the world’s crude oil and its decisions can have a major impact on oil prices.