Oil prices climbed to $78 a barrel Wednesday amid hopes that Europe will contain the debt crisis that has engulfed Greece and threatens to destabilize other countries that use the euro.

By early afternoon in Europe, benchmark crude for November delivery was up $2.45 to $78.12 a barrel in electronic trading on the New York Mercantile Exchange. The contract fell $1.94 to close Tuesday at $75.67 a barrel in New York.

In London, Brent crude was up $1.97 to $101.76 a barrel on the ICE Futures exchange. Brent fell $1.92 to finish at $99.79 per barrel on Tuesday, the first time it ended lower than $100 since February.

Oil prices on the Nymex have fallen from $100 in late July as the financial crisis swirled around Greece. The country, which is on the brink of bankruptcy, will not receive its next installment of a rescue loan without meeting strict austerity measures imposed by international lenders.

But sentiment recovered on Tuesday following reports that Europe was taking steps to bolster its banking sector, which is thought to be heavily exposed to Greek debt and could face crushing losses if the country defaults. Wall Street ended higher after a day of wild gains and losses. The Dow gained 1.4 percent, while the Standard and Poor's 500 rose 2.2 percent and the Nasdaq composite rose 3 percent.

"The rebound in stocks managed to pull the energy complex off the bottom from what had been a steep late-session sell-off," energy trader and consultant The Schork Group said in a report. "Which way the equities go (Wednesday) will determine much of where oil will go."

While stock markets were mostly lower in Asia, European ones were posting strong gains. London's FTSE 100 was up 2.3 percent and Germany's DAX index had advanced 3.7 percent by 1130 GMT.

Prices were also supported by a report from the American Petroleum Institute which said U.S. crude stocks fell 3.1 million barrels last week, while gasoline stocks were down 5 million barrels.

Analysts polled by Platts, the energy information arm of McGraw-Hill Cos., had been expecting builds of 2.5 million barrels in crude and of 1.3 million barrels in gasoline stocks.

The inventories report from the Energy Department's Energy Information Administration — the market benchmark — will be out later Wednesday.

MasterCard SpendingPulse also said that American drivers continue to cut back on gasoline purchases.

"According to MasterCard, the demand for gasoline over the past four weeks was down an average of 2.5 percent year on year. It has now been retreating steadily year on year for 28 successive weeks," said analysts at Commerzbank in Frankfurt. "Consequently, prices are unlikely to recover any further."

In other energy trading in Nymex November contracts, heating oil rose 4.35 cents to $2.7669 per gallon and gasoline futures gained 5.93 cents to $2.5477 per gallon. Natural gas rose 2.5 cents to $3.663 per 1,000 cubic feet.


Pamela Sampson in Bangkok contributed to this report.

Copyright 2011 The Associated Press.