The ever-weakening dollar and worries about winter fuel supplies sent US oil prices to a peak at $98.62 a barrel.
Analysts expect oil to break $100 a barrel
But prices later fell back sharply after US crude inventory figures showed a smaller than expected weekly fall.
US light, sweet crude settled down 33 cents at $96.37 while Brent closed at $93.24, down from a high of $95.19.
In recent sessions, record levels have been followed by falls of at least $1, and analysts say that prices are still on their way to $100 a barrel.
The weaker dollar has been driving up oil prices as investors have been using the commodity as an alternative to holding dollars, and crude prices have also been lifted in recent days by bad weather hitting North Sea oil rigs.
$100 a barrel 'inevitable'
Oil prices have now risen by 60% this year and some analysts say that $100-a-barrel oil is inevitable.
Oil prices fell back after a smaller than expected drop in inventories
"We're going to get $100 before too long," said Kevin Norrish of Barclays Capital.
"I think we'll get there," said Dariusz Kowalczyk at CFC Seymour. "The factors that have been driving the recent trend are still in place."
A big fall in US crude inventories might have been enough to push the price over $100 a barrel, but in the event the figures from the Department of Energy showed a smaller than expected drop.
US crude oil inventories fell by 800,000 barrels over the past week to 311.9 million barrels.
Oil prices have still not reached a record high if inflation is taken into account.
Adjusting for inflation, US light crude's record peak of $101.70 came in 1980 against a backdrop of war between Iraq and Iran.
The dollar's current weakness has also seen prices of other commodities rise sharply, most notably gold, which is continuing near 27-year highs.
Gold prices have also been lifted by the higher cost of oil, as investors see it as a haven against the inflation risk caused by increased crude costs.
Gold rose a further $10.10 to close at $833.50 an ounce on Wednesday.
Separately on Wednesday, the International Energy Agency (IEA) warned that the rapid economic growth in China and India could have devastating consequences for the world's energy supply.
Calling on both countries to increase efforts to curb their demand for oil, petrol and natural gas, the IEA said the two countries would account for about 45% of the increase in global energy demand by 2030.
"How China and India respond to the rising threats to their energy security will also affect the rest of the world," said the Paris-based agency.