There are fears that the fighting will hurt oil exports from Basra
Oil prices went above $108 a barrel after one of Iraq's main export pipelines was blown up.
A company official said damage would cut Basra's exports by a third, adding to supply fears and increasing concern about stability in the region.
The rise extended Wednesday's gains of $4 a barrel after a US report showed lower-than-expected petrol stocks.
A sharp sell-off of all commodities last week took oil below $100 after investors cashed in their gains.
The price of New York light sweet crude oil closed at $107.58 dollars per barrel having hit $108.22 dollars.
Another key measure of the oil price, London Brent crude, finished $1.01 higher at $105, having peaked at $105.60 during the session.
Last week, the price of oil reached a record high of $111.80.
The fighting in Basra escalated this week after a military operation was launched against militias in the city.
"We see events in Iraq as having taking a dangerous turn with the stability of the southern oil system now starting to become a potential concern," said Barclays Capital analysts in a note.
Iraq is a member of producers' cartel Opec and one of the world's biggest oil exporters.
The prospect of export problems in Iraq compounded supply fears raised on Wednesday in the US.
The US Department of Energy said that petrol stocks were falling as refiners cut production because high oil prices were squeezing their profit margins.
Traders said the weak US dollar was also supportive to oil prices, as it becomes cheaper to buy oil for non-dollar investors.
The US dollar has remained low against key currencies, including the euro, sterling and Japanese yen, which helped to support oil prices.
The greenback was virtually unchanged against the euro at $1.5795 as a series of disappointing US economic data on durable goods orders and home sales failed to lift hopes that a US economic recovery was in sight.
This sparked a wave of buying in gold, a hedge against inflation and a haven in times of financial market volatility.
Gold prices rose as high as $954.50 an ounce, a one-week high, before reversing all the day's gains to trade at $946.33.
The precious metal reached a lifetime high of $1,030.80 an ounce on 17 March and many analysts were confident that it would reach this level again if the dollar remained low and oil prices stayed high.
"We are pretty bullish on gold over the medium-term," said Dan Smith, metals analyst at Standard Chartered Bank.