Oil prices ended above the $50-a-barrel mark on Friday amid concern over possible conflict in Nigeria's oil-producing delta region, where a two-day truce between rebel militia and government forces is holding. US light crude settled at $50.12 a barrel, up 48 cents on the day. It is the first time the benchmark contract has closed above $50 in its 21 years of trade on the New York Mercantile Exchange. It hit an all-time peak of $50.47 earlier this week in after hours trading.
London Brent crude was 27 cents up, at $46.65 a barrel.
Nigeria's government on Friday called off gunships and helicopters sent to attack the rebel militia, salvaging talks and averting a threatened rebel offensive.
Earlier, the rebels had accused Nigerian President Olusegun Obasanjo's government of violating a two-day cease-fire and had threatened to blow up a critical natural gas plant if attacked.
The rebel militia had told oil companies to shut down unless the government began talks on autonomy and revenue for the impoverished region, home to most of Nigeria's 2.3 million barrel per day oil output.
So far only a small amount of production has been affected by the fighting, but companies fear a repeat of last year's uprising in the delta, which temporarily shut 40 percent of Nigeria's output.
Rebel warlord Mujahid Dokubo-Asari threatened to blow up a natural gas gathering station at Soku, a facility which collects natural gas from the surrounding area and feeds it to a liquefied natural gas export plant at Bonny Island.
Prices hit record highs earlier this week on fears that disruption to Nigerian supply could inflict further strain on world supplies already struggling to meet the fastest demand growth in 24 years.
Prices eased a little on Wednesday after the US government reported a surprise increase in crude stocks. The impact was blunted by a fall in refined product stocks ahead of winter after refinery operations were disrupted by Hurricane Ivan.
"The normal autumn easing of fundamentals has been frustrated by Hurricane Ivan in the US Gulf Coast," Washington D.C.-based analysts PFC Energy said in a report.
The US government said almost 29 percent of daily output in the Gulf of Mexico remained shut after Ivan.
"As winter approaches, the situation is poised to worsen as demand rises seasonally in both the Atlantic and Pacific Basins," PFC Energy said.
Big importing nations have so far put up a calm front about the fallout from higher oil prices.
A G7 official said ahead of Friday's meeting of finance ministers in Washington that there was now "a recognition that oil resources were scarcer than was thought a few years ago."
The G7 official suggested the rise in oil costs was not only driven by speculation but had more structural causes linked to levels of supply being overestimated.
Analysts said an overnight drop in the dollar had also pushed up prices of commodities across the board, supporting oil prices. The US currency has fallen to its lowest level against the euro since mid-July.