US oil closes at $48.31, posts best settle since October

U.S. crude prices hit seven-month highs on Tuesday on expectations of lower U.S. stockpiles and after wildfires threatened anew Canadian oil supplies, but pared some gains due to the potential for higher Libyan output.

U.S. crude inventories likely fell a second straight week last week, declining by around 3.2 million barrels, a Reuters poll of analysts said.

In Canada, energy producers were hit with fresh disruptions after a massive wildfire burning around the oil sands hub of Fort McMurray, Alberta, shifted north, forcing the evacuation of about 4,000 people from work camps.

The combined factors drove U.S. crude's West Texas Intermediate (WTI) futures to mid-October highs. Brent crude futures reprised November peaks reached on Monday.

Prices came off their highs after a deal struck in Vienna between rival Libyan oil factions indicated the first step towards restoring crude production mostly shut down in the North African country. Traders were also eyeing the restart soon of some of the shut Nigerian output.

U.S. crude posted its best settlement since October, closing at $48.31 a barrel, up 59 cents, or 1.2 percent, after hitting a seven-month high at $48.42.

Brent crude's front-month rose 36 cents, or 0.7 percent, at $49.33, off the six-month high of $49.58.

On Monday, WTI rallied more than 2 percent while Brent 3 percent on worries over Nigerian and Venezuelan outages and as long-time bear Goldman Sachs sounded more positive on the market.

"All in all, this feels like a complex that still possess enough bullish momentum to boost nearby WTI values to above the $50 mark, while bolstering July Brent to as high as the $53-54 area," said Jim Ritterbusch of Chicago-based oil markets consultancy Ritterbusch & Associates.

But some prominent banks in commodities, such as Bank of America Merrill Lynch (BAM) and Switzerland's UBS, said the rally could fade.

"As refiners prepare to go into maintenance, we thus reiterate our end of 3Q16 target for WTI of $39 per barrel," BAM said in a note, citing typical weakness for oil in the third quarter.

It suggested investors sell WTI "into event-driven stress at $45.75."

UBS raised its longer-term upward target for Brent to $55 a barrel from $47, but remained bearish near-term.

"Although a smaller market surplus reduces the risk of prices hitting $30 a barrel in the short run, temporary price setbacks towards $36 mark our base case," it said.

Traders will be looking out for more U.S. crude inventory data due from industry group, the American Petroleum Institute, after market settlement at 4:30 p.m. EDT (2030 GMT). The U.S. government will issue official stockpiles data on Wednesday.

Further support could come from lower output in the United States. U.S. shale oil has been declining and is expected to fall in June for an eighth consecutive month, according to a U.S. government forecast on Monday.