Oil prices rose sharply to above $70 a barrel on Thursday on renewed rebel attacks against oil facilities in Nigeria and worries that a glitch at the largest U.S. oil refinery could tighten gasoline stockpiles this summer driving season.

Crude also got a lift from a rally on Wall Street fueled by optimism the economic recession was easing -- a prospect that could spell a recovery in ailing world energy demand. <.N>

U.S. crude futures for August rose $1.56 to settle at $70.23 a barrel. London Brent crude rose $1.45 to $69.78 a barrel.

You had Nigeria and spillover strength from equities and gasoline stronger on the Baytown Exxon snag, said Jim Ritterbusch, president at oil consistency Ritterbusch & Associates in Galena, Illinois.

In the latest in a string of attacks in Nigeria, Africa's biggest oil producer, the Movement for the Emancipation of the Niger Delta (MEND), said it had sabotaged the Billie-Krakama pipeline in Rivers State, which supplies one of the country's main export terminals.

Attacks by MEND have forced foreign oil companies, including U.S. oil major Chevron and Italy's Agip , to shut at least 133,000 barrels per day of oil production in the last month.

Shell said it had shut one of its pipeline junction points on Thursday but declined to say whether any oil production had been affected.

Nigeria's MEND rebels have escalated their activities recently and are certainly a supportive influence (to oil prices), Mike Fitzpatrick, vice president at MF Global in New York, said in a research note.

Adding to the gains, Exxon Mobil told environmental regulators in Texas that its huge Baytown refinery suffered an operational glitch that triggered flaring.

Gasoline futures rose 5.58 cents to $1.8983 a gallon with traders looking at relatively thin U.S. stockpiles ahead of the July 4 holiday weekend, typically the busiest driving weekend of the year.

Oil's rally came alongside hefty gains on Wall Street. Oil has tracked equities markets closely in recent months as traders look for signs of economic optimism.

Crude prices have more than doubled since the lows near $30 a barrel plumbed last winter, on hopes for an economic recovery. A Reuters poll of industry analysts showed oil prices are expected to average more than $70 a barrel in 2010, compared with the latest forecast average of $56.59 for this year.

The U.S. economy shrank slightly less in early 2009 than previously thought, the government reported on Thursday, though there was widespread weakness in activity and demand was soft.

Gross domestic product dropped 5.5 percent in the first quarter, from 6.3 percent in the last quarter of 2008.

Separately, the Labor Department said the number of U.S. workers filing new claims for jobless benefits unexpectedly rose last week by 15,000 to a seasonally adjusted 627,000 -- a measure of the strain still faced by hard-pressed consumers.

(Additional reporting by David Sheppard in London and Ramthan Hussain in Singapore; Editing by Marguerita Choy and David Gregorio)