Oil prices rose on Tuesday on buying inspired by gains on Wall Street and a flurry of U.S. refinery problems leading into peak summer driving season.

U.S. crude rose 51 cents to $59.54 a barrel by 12:35 p.m. EDT, while London Brent rose 24 cents to $58.71.

U.S. equities rose slightly as Wall Street remained hopeful that the global recession was moderating. <.N>

Commodities markets have closely tracked the stock market in recent months as dealers seek signs of economic health.

Oil traders added that a spate of refinery problems in the United States encouraged oil's gains by rekindling worries about gasoline supply this coming summer.

Police in Corpus Christi, Texas, on Tuesday said a fire broke out in a portion of Flint Hills Resources' 288,126 barrel per day refinery. A Flint Hills official was not immediately available to comment on the production impact.

The Flint Hills news definitely gave a boost to products, said Tom Bentz, analyst at BNP Paribas Commodity Futures Inc.

The fire came after an explosion at Sunoco's oil refinery in Marcus Hook, Pennsylvania, on Sunday forced the company to shut a gasoline-making unit and slow crude oil processing.

The oil market closely monitors refinery operations in the spring as suppliers try to boost gasoline inventories ahead of summer vacation season when demand peaks.

Gains on the oil and equities markets were tempered by weak U.S. housing data for April showing housing start permits dropping to a record low.

Housing led the U.S. economy into recession and the April figures released today are a stark reminder that we are not yet out of the woods, Harry Tchililnguirian, BNP Paribas' senior oil analyst, said.

Oil prices have been on an upward trend since mid-April in equity-led rallies. They have recovered from below $33 in December last year after a plunge from record highs above $147 in July.

In key African and OPEC producer Nigeria, the main militant group said on Monday it would blockade key waterways in the delta to try to prevent crude oil exports after days of military helicopter and gunboat raids on its camps.

Traders will shift their focus to two sets of U.S. weekly oil data later on Tuesday and Wednesday. Analysts expect the data to show falls in crude oil and gasoline inventories by 700,000 barrels and 1.0 million barrels, respectively.

(Reporting by Richard Valdmanis, Robert Gibbons and Gene Ramos in New York, Ikuko Kao in London; Editing by David Gregorio)