LONDON - Oil prices slipped off five-month highs on Thursday as bearish sentiment about fuel demand undermined support from a weak dollar and falling U.S. crude inventories.

Brent crude was up 48 cents at $45.65 a barrel by 1318 GMT, while U.S. crude was up 43 cents at $42.62 after a four-day streak of gains.

The two benchmarks had risen to their highest since March 6, completing a four-day rally, after the Energy Information Administration reported a much bigger than expected drop in U.S. crude stockpiles.

A weaker U.S. dollar was also supportive for oil prices as it makes dollar-priced oil cheaper for holders of other currencies.

The dollar index, which measures the greenback against a basket of six major currencies , logged its biggest monthly percentage fall in a decade in July and a Reuters poll found analysts expected it to continue falling into next year.

The index was up around 0.06% Thursday after falling for two sessions but stayed near two-year lows.

Still, oil investors remain wary of rising U.S. refined product inventories at a time when U.S. central bankers said the resurgence in coronavirus cases was slowing the economic recovery in the world's biggest oil consumer.

EIA data showed distillate stockpiles, which include diesel and heating oil, climbed to a 38-year high and gasoline inventories unexpectedly rose for a second week.

The U.S. EIA calculated gasoline demand remains at around 8.6 million barrels per day, around 10% lower than a year earlier, just as the U.S. driving season was winding down.

"In the medium term the weak demand is likely to weigh more heavily than the positive sentiment, which is why we expect prices to correct in the near future," Commerzbank analyst Eugen Weinberg said.

JPMorgan trimmed its oil demand forecast for the second half of the year by 1.5 million barrels per day, but raised its average Brent price forecast for the whole year to $42 a barrel from $40. 

(Additional reporting by Sonali Paul in Melbourne and Seng Li Peng in Singapore; Editing by Edmund Blair and Susan Fenton) ((Shadia.Nasralla@thomsonreuters.com; +44 207 542 5083; +44 778 99 43141; Reuters Messaging: Reuters Messaging: shadia.nasralla.reuters.com@reuters.net))