Oil handed back early gains to stand below $83 a barrel on Friday, but stayed within sight of an all-time high as fund buying spurred by a weak dollar provided support.

U.S. crude eased 10 cents to $82.78 by 6:55 a.m., after gaining $2.58, or 3.24 percent, in the previous session. Oil was recovering from a profit-taking dip earlier this week that knocked prices from a peak of $83.90 hit on September 20.

London Brent crude was off one cent at $80.02, after earlier hitting an all-time high of $80.49.

The ever-weakening U.S. dollar is probably the key driver of this, with non-commercial long interest being fuelled by the view that the U.S. will sacrifice its currency to prop up growth, said a Citigroup research note.

The dollar hit an all-time low against a basket of currencies for the second consecutive day on Friday, pressured by worries about the health of the U.S. economy and likelihood of more interest rate cuts.

On a macro level people are clearly buying crude oil as a hedge against a weaker dollar. The crude market is structually very solid, said a hedge fund manager based in Asia.

The weak dollar, which can strengthen the nominal values of commodities traded in the currency, also boosted metals.

Right now many speculators and investors are looking into the energy market, lots of new money is pouring into energy funds, said Kentaro Obata, Tokyo-based trading director at Astmax.

Analysts say continued robust demand in the United States and other consumer nations could drain world stockpiles just as cold weather settles in the northern hemisphere.

In terms of inventories to demand, the ratio is getting smaller and we're seeing a bullish impact on prices, said ANZ analyst Andrew Harrington.

Persistent fears of supply disruptions during the rest of the hurricane season were also supporting gains, dealers said, but tropical storm Lorenzo -- forecast to become a hurricane before slamming into Mexico -- is unlikely to affect production.

(Additional reporting by Damon Evans in Singapore and Santosh Menon in London)