US oil ends 1.4 pct higher, at $48.99; posts 28 pct quarterly gain

Oil prices rose on Friday from early losses, with traders citing potentially more bullish investor positioning for the second half of the year and after a weaker dollar that boosted most commodities.

The market also found some support after falling more than 3 percent on Thursday as traders booked profits at the end of the best quarter in seven years. Crude prices had jumped 25 percent over the past three months.

Also on Friday, oilfield services firm Baker Hughes reported the number of rigs operating in the United States rose by 11 to a total of 341, marking the fourth increase in five weeks. At this time last year drillers were operating 640 rigs.

Volumes in key Brent and U.S. crude futures were significant for New York's morning trade despite the hesitation typically common before a long weekend. U.S. financial and commodity markets will be closed on Monday for the Independence Day holiday.

Global benchmark Brent crude futures were up 68 cents at $50.40 a barrel.

U.S. West Texas Intermediate (WTI) crude settled 1.37 percent higher, or 66 cents, at $48.99 a barrel and posted a quarterly gain of 28 percent.

The rebound came as the dollar index fell 0.5 percent, making commodities denominated in the greenback more affordable for holders of the euro and other currencies.

For the week, Brent was on track to a gain of nearly 3 percent, helped largely by a return of fund buying in oil this week as financial markets moved on from the liquidation sparked by Britain's exit vote from the European Union. WTI was up nearly 1.6 percent for the week.

"There is some pre-holiday market positioning for the second half that's going on," said David Thompson, executive vice-president at Washington-based commodities-focused broker Powerhouse. "People are also moving on from Brexit, accepting they have to deal with an 'organized divorce' with Britain."

The Commodity Futures Trading Commission will also issue weekly data at around 3:30 p.m. (1930 GMT) on positions held by speculators, including hedge funds, in oil.

Hedge fund positions in oil have been bullish lately, with bets for higher prices rising last week before the market's plunge on the Brexit vote.

U.S. Energy Secretary Ernest Moniz said he expected oil supply and demand to balance by 2017.

Even so, some analysts remain pessimistic of significant price gains in the second half.

Analysts at Barclays, for instance, cut their price forecasts by $3 a barrel each, forecasting Brent at $44 and WTI at $43 for the remainder of 2016.

"Markets have experienced only the tip of the iceberg in terms of the impact of the UK's 'leave' vote," Barclays analysts said in a note.