US benchmark West Texas Intermediate was up 31 cents to $107.14, while Brent crude gained 35 cents to $115.16 in mid-morning trade.

"We see oil retaining support from the violence in Iraq, but markets have already priced in a significant risk premium in the last few weeks," David Lennox, resource analyst with Fat Prophets in Sydney, told AFP.

In an interview with US television network CBS that aired Sunday, US President Barack Obama warned that the militants who have surged through Iraq in a lightning offensive could destabilise other countries in the volatile Middle East.

The militants were continuing an advance in western Iraq Sunday, killing 21 people after security forces left several towns.

The militants have captured swathes of the country's north but have yet to directly threaten the key oil-producing region in the south, the main source of exports.

"We see prices remaining relatively stable at current levels as long as the crisis does not spread to Iraq's south where most of its exports are coming from," Lennox said.

"The market has already been quite used to patchy output from the north where the fighting is currently going on, and it must also be noted that Iraq has been extremely volatile in terms of output for many years now," he added.

The violence in Iraq has a direct bearing on global crude prices because the country is the second-biggest oil exporter in the 12-nation Organization of Petroleum Exporting Countries (OPEC) after Saudi Arabia.

It has more than 11 percent of the world's proved resources and produces 3.4 million barrels a day.