Brent crude was little changed on Wednesday, with bloodshed in Syria highlighting worries about supply from the Middle East, offsetting worries about the state of the global economy.
Brent crude was up 22 cents to $104.22 a barrel by 1322 GMT, after settling 63 cents higher on Tuesday. U.S. oil rose 3 cents to $89.25 a barrel after ending up 79 cents.
Syria's defense minister and President Bashar al-Assad's brother-in-law were killed in a Damascus suicide bomb attack carried out by a bodyguard on Wednesday, the most serious blow to Assad's high command in the country's 16-month-old rebellion.
Oil has gained more than 17 percent since the low it touched last month, largely because of resurfacing worries about potential conflict between Iran and some Western nations.
The Iran issue is more at the front of minds, said Andy Sommer, analyst at EGL in Dietikon, Switzerland.
It was almost ignored in Q2 but it is now an issue that has caused a loss of capacity, and it has combined with seasonal increase in demand to push up prices.
Iran said it would insure any foreign ships that enter its waters, in an effort to skirt a European Union ban on insuring ships carrying Iranian crude that has hampered the country's oil exports.
The EU enacted a ban on July 1 on insurance for tankers carrying Iranian oil, preventing EU insurers and reinsurers from covering tankers carrying Iran's crude anywhere in the world.
The geopolitical risk premium is coming back. There is quite a large concentration of U.S. warships in the (Middle East) Gulf. There's a heightened risk in the area, Morrison said.
Keeping investors anxious about prospects for the economy, Federal Reserve Chairman Ben Bernanke in his testimony to the Senate Banking Committee said the Fed stood ready to offer more stimulus as needed but stopped short of signaling action in the near term.
He also said recovery was being held back by anxiety over Europe's debt crisis and expressed unease over a stagnant jobs market.
Investors were awaiting data on crude stockpiles in the United States due later in the day from the Energy Information Administration (EIA) to confirm an industry report that said inventories fell more than expected.
Crude inventories fell by 2 million barrels in the week to July 13, gasoline stocks fell by 116,000 barrels and distillate stocks rose by a sharp 3.4 million barrels, data from the American Petroleum Institute showed.
A Reuters poll of 10 analysts forecast a 1.2 million barrel drop in domestic crude inventories. Gasoline inventories were forecast up 1.2 million barrels, on average, while distillate stocks were projected to rise 1.5 million barrels.
Seasonality appears to be a positive influence with draw-downs on high U.S. crude oil stocks, to fuel the peak of the U.S. driving season, encouraging buying, analysts at ANZ said in a note.
Brent will retrace into a range of $101.24-$102.07 per barrel, as suggested by its wave pattern and the RSI indicator, while U.S. oil faces resistance at $89.50 per barrel and may revisit its Tuesday low of $87.41, according to Reuters technical analyst Wang Tao.