Light, sweet crude for June delivery rose 70 cents to settle at $50.83 a barrel on the New York Mercantile Exchange (search). Unleaded gas rose 1.28 cent to $1.4792 a gallon while heating oil fell 1.08 cent to $1.4437.

On London's International Petroleum Exchange (search), June Brent rose 16 cents to $51.13 a barrel.

The Department of Energy (search) reported Wednesday that U.S. crude oil supplies rose by 2.6 million barrels last week, bringing inventories in the world's largest energy consumer to 327 million barrels — 9 percent above last year's level and the highest since July 1999.

But analysts said other numbers in the report were less indicative of an oversupply on all fronts.

In London, Deutsche Bank analyst Adam Sieminski described diesel and heating oil stocks as "still fairly tight."

"There are still very serious concerns about how much gasoline is going to be available in the driving season, which begins in about a month," he said.

Recent growth in oil and gasoline supplies have brought oil prices down from an all-time high of $58.28 in early April. However — beyond the usual concerns about the summer driving season — there are worries that the Organization of Petroleum Exporting Countries (search) may not be able to keep up with an anticipated surge in demand later this year.

There is a "strongly held expectation of supply deficits in the fourth quarter," said Energyintel analyst David Knapp.

Crude futures remain nearly 30 percent above year-ago levels but would need to surpass $90 a barrel to exceed the inflation-adjusted high set in 1980.