NEW YORK (Reuters) - Oil futures settled up slightly on Thursday, well off session highs, after a sharp but short-lived boost from a much bigger-than-expected decline in U.S. inventories of crude oil and gasoline.

A flame shoots out of a chimney at a petro-industrial factory in Kawasaki near Tokyo December 18, 2014. REUTERS/Thomas Peter

Oil has not sustained gains for more than a couple of weeks as investors have grown more worried about the stubborn global crude glut.

U.S. crude stocks fell 6.3 million barrels, the U.S. Energy Information Administration (EIA) said, citing stronger refining activity and reduced imports. That was much more than the draw of about 2.3 million barrels analysts had forecast, and it took total crude inventories to 502.9 million barrels, the lowest since January.

Crude prices gave back gains in the early afternoon. After hitting a high of $46.53 a barrel, U.S. futures settled up 39 cents to $45.52 a barrel. Brent futures hit a high of $49.18 a barrel after the inventory figures were released, but settled up 32 cents to $48.11 a barrel.

“There’s a lot of bearishness out there now,” said Phil Flynn, analyst at Price Futures Group in Chicago. “The market is still believing supplies are not going to be in balance globally.”

Investors believe the Organization of the Petroleum Exporting Countries will need to make further output cuts to offset thriving shale production in the United States.

U.S. gasoline stocks dropped 3.7 million barrels in the most recent week, far exceeding the expected drop of 1.1 million barrels. Still, gasoline inventories remain about 6 percent above seasonal averages, so investors will watch for July data to see if demand is strong enough to whittle down stocks.

The price of oil has tumbled from one-month highs just below $50 on increased production from OPEC, even as the group has pledged to cut output.

A number of investment banks in the last two weeks have reduced price outlooks, with Bank of America Merrill Lynch cutting its average Brent forecasts to $50 this year and $52 per barrel in 2018, from $54 and $56 before. [nL1N1JR09A

Bernstein Research reduced its average Brent forecasts for 2017 and 2018 to $50 per barrel, from $60 and $70 previously.

Saxo Bank said oil prices could rise toward $55 in coming months, but it expected lower prices at year-end and into 2018.

(To view a graphic on OPEC crude oil exports, click reut.rs/2sKHJct)