Benchmark crude for September delivery added 36 cents to settle at $70.52 a barrel on the New York Mercantile Exchange. In London, Brent crude prices climbed 59 cents to settle at $73.48 a barrel on the ICE Futures exchange.
Oil prices should be depressed right now, given the tepid demand for gasoline and a growing surplus of crude in the U.S. But Newedge analyst Antoine Halff said the tactic of buying oil contracts as a hedge against inflation is "back with a vengeance."
Benchmark crude, which is priced in dollars, tends to rise when the dollar falls as foreign investors gain more buying power. It's recently become a convenient place to park large amounts of cash as the dollar loses ground to other currencies.
Investors also have been pumping money into oil based on general enthusiasm about the path of the global economy. This week, analysts with Barclays Capital went as far as predicting that the recession already has ended in many countries, and oil demand will surge in the second half of the year.
Tom Kloza, publisher and chief oil analyst at Oil Price Information Service, said it's mostly wishful thinking.
"None of the statistics really point to anything happening on the ground in terms of demand," Kloza said. "It seems like there's very comfortable amounts of crude oil out there."
Meanwhile, government reports showed that the economy remains on shaky ground.
The Commerce Department said Thursday that retail sales fell 0.1 percent last month. Economists expected a gain of 0.7 percent. And the Labor Department said initial jobless claims grew more than expected to a seasonally adjusted 558,000.
The Energy Department's Energy Information Administration also said natural gas stockpiles grew last week. The country's natural gas inventory can be used to measure energy demand in the U.S., since many power plants use it to produce electricity.
The build in natural gas was less than expected, though inventory levels are now 20 percent above their five-year average for this time of year.
The U.S. Dollar Index fell Thursday, a day after the Federal Reserve said it would hold interest rates at record lows.
The central bank also will continue an emergency program to buy Treasury securities until October. The program is meant to lower mortgage rates and other consumer debt, but some economists see it as inflationary, making it look like the government is printing money to fix the economy.
At the pump, retail gas prices ticked higher overnight to a new national average of $2.647 a gallon, according to auto club AAA, Wright Express and Oil Price Information Service. A gallon of regular unleaded is 13 cents more expensive than it was a month ago, but it's $1.14 cheaper than last year.
In other Nymex trading, gasoline for September delivery gave up less than a penny to settle at $2.0192 a gallon. Heating oil rose 1.07 cents to settle at $1.9028 a gallon. Natural gas for September delivery lost 14.3 cents to settle at $3.336 per 1,000 cubic feet.