Oil climbed toward $71 a barrel on Friday, extending a 2 percent gain the day before, after rebel attacks on Nigerian oil facilities disrupted supply and equity markets rallied on optimism the global recession was ebbing.

The release of the June consumer sentiment index by the Reuters/University of Michigan Surveys of Consumers later is expected to reflect a mildly improving outlook for the U.S. economy, auguring well for ailing world energy demand.

Though U.S. jobless claims last week rose unexpectedly, underlining lingering weakness in the world's largest economy, first-quarter gross domestic product shrank slightly less than estimated, suggesting that the worst of the downturn could be over.

U.S. crude futures for August gained 57 cents to $70.80 a barrel by 0600 GMT, off an earlier high of $70.83 and after settling at $70.23 in the previous session. London Brent crude rose 62 cents to $70.40.

Oil is on course for a 1.7 percent gain this week, buoyed by optimism over a potential economic recovery that has lifted prices from below $40 over the past three months.

Worry over the geopolitical situation is a big factor right now, and that's what's giving the market traction, said Peter McGuire, managing director of Commodity Warrants Australia, referring to the situation in Iran.

We had a correction earlier in the week, and the technicals still look a little bearish, but you can't rule out the fundamentals, and you can't rule out the geopolitical.

About 20 people have been killed in protests after Iran's June 12 presidential election, the worst unrest since the 1979 Islamic revolution.

Investors are also keeping their eyes peeled on Nigeria, where President Umaru Yar'Adua on Thursday offered amnesty to gunmen in the Niger Delta who lay down their weapons by October 4, a bid to end unrest which has cost Africa's top oil exporter billions of dollars in lost revenue.

The main militant group, the Movement for the Emancipation of the Niger Delta (MEND), sabotaged a Royal Dutch Shell oil pipeline on Thursday, the latest act in a month-old campaign which has shut in at least 133,000 barrels per day. The attack helped push oil to near $71 a barrel.

Fuelling oil's rise, Exxon Mobil said its huge Baytown refinery suffered an operational glitch that triggered flaring, sparking worries the largest U.S. oil refinery could tighten gasoline stockpiles during this summer's peak demand driving season.

Firmer Asian stocks on the back of Wall Street's rally also lent support to oil, with shares outside Japan <.MIAPJ0000PUS> climbing 1.4 percent and Japan's Nikkei <.N225> up 0.8 percent.

A further boost came from a fall in the dollar against most major currencies on Friday, extending losses the previous day, as investors shifted funds back into risky assets after the Federal Reserve this week appeared to confirm it would keep interest rates low for a while.

The Reuters/University of Michigan final June consumer sentiment index, due at 1355 GMT, is expected to show a reading of 69.0 compared with 68.7 in the May report, a Reuters poll of economists showed.

(Editing by Ben Tan)