Oil rose towards $111 a barrel on Monday as escalating violence in the Middle East fuelled concerns over oil supplies from the region and as hopes rose that a U.S. budget crisis could be averted.
Investors fear the Israeli-Palestinian conflict may draw in other countries and possibly disrupt energy exports from the region, which supplies more than a third of the world's crude.
Israel raised the stakes on Monday, saying it was ready for a ground invasion in the Gaza Strip, but preferred a diplomatic solution.
Risk analysts say it is unlikely the confrontation between Israel and Gaza will spill out into a wider conflict, but investors were wary, knowing previous Middle East wars have led to oil embargoes and temporary disruptions to energy supplies.
Brent futures were up $1.78 to trade at $110.73 by 1346 GMT. U.S. crude oil rose $1.36 to trade at $88.28.
"There's no oil being lost, obviously. But it's just the follow-on effect. No one likes confrontation anywhere near the Gulf region," said Rob Montefusco, oil broker at Sucden Financial in London.
"I would have thought (oil) would have been weaker, because the demand hasn't really been there."
United Nations Secretary General Ban Ki-moon was due to arrive in Cairo on Monday to support ceasefire efforts led by Egypt, which borders both Israel and Gaza and whose Islamist-rooted government has been hosting leaders of Hamas.
"It's a very fluid situation. As long as the fighting continues we will maintain a certain geopolitical premium in the oil prices," said Olivier Jakob, an oil analyst at Petromatrix.
Financial markets also found support from expectations that U.S. politicians would be able to avoid a budget crisis, helping support growth in the world's biggest oil consumer.
A deal has to be agreed before January when a "fiscal cliff" - more than $600 billion in tax increases and spending cuts - will kick in and could push the U.S. economy back into recession.
Top lawmakers emerged from a meeting with President Barack Obama on Friday confident of finding common ground on taxes and spending to help them avert the disastrous situation.
"Hopes for a solution to the crisis over the U.S. budget are also providing support for all financial markets," said Carsten Fritsch, senior commodities analyst at Commerzbank in Frankfurt.
"Stock markets and commodities markets are hoping a U.S. budget deal can be found - so markets are in a 'risk on' mode."