Updated

Oil prices rose Thursday on the heels of a runup in gasoline futures that was triggered by an explosion at America's third-largest oil refinery. The jitters follow a three-day selloff in which oil prices fell by more than $3 a barrel.

Light, sweet crude for May delivery settled up $1.03 to $54.84 a barrel on the New York Mercantile Exchange (search) after falling more than $3.50, or 6 percent, in the previous two sessions.

Gasoline futures were up 2.26 cents at $1.5975 per gallon.

In London, Brent crude futures were up 89 cents to $53.93 a barrel on the International Petroleum Exchange (search).

The BP refinery in Texas City (search), Texas, produces 30 percent of the company's North American supply of petroleum products, and 3 percent of the U.S. gasoline supply. It processes about 430,000 barrels of crude oil a day.

The cause of the explosion, which left 14 people dead and more than 100 injured, was not immediately known. It occurred in a part of the plant used to boost the octane level of gasoline.

"The explosion ... is viewed as a problem," said Deutsche Bank analyst Adam Sieminski in London.

He also suggested that despite the inventory builds shown in the Energy Department (search) weekly report Wednesday, strong demand from China and other growing economies would probably keep prices high over the medium term.

While new figures show lesser Chinese hunger for energy, "demand is still rising and that's what's got people worried," he said.

Oil futures on the Nymex are down more than $3 a barrel since their intraday high of $57.60 set last Thursday.

Analyst Phil Flynn at Alaron Trading Corp. described the recent drop from all-time highs as a "correction of a market that was ahead of itself."

"The bulls are still waiting," he said.

Oil is roughly 45 percent more expensive than a year ago but still well below the inflation-adjusted peak above $90 a barrel set in 1980.

Bringing at least temporary relief, the U.S. report said that crude oil inventories rose by 4.1 million barrels last week to 309.3 million barrels, or 8 percent above year-ago levels.

The strengthening dollar has also eased the crude market in recent days, as a rise in the dollar — the currency of international oil trading — will spur funds to switch money from commodities such as energy and metals into foreign exchange markets.