Oil rose nearly 2% early on Wednesday after industry data showed crude inventories in the United States dropped sharply, but analysts said uncertainty had crept into the market amid growing suspense over the result of the U.S. presidential election.
West Texas Intermediate was up 71 cents, or 1.9%, at $38.37 a barrel by 0157 GMT, having gained more than $1 earlier in the day. Brent crude was up 64 cents, or 1.6%, at $40.35.
Oil prices dropped more than 10% last week with rising coronavirus cases around the world and more restrictions on movement hitting demand prospects. U.S. oil has nearly recouped those losses in three days of gains this week in the run-up to the election.
"The risk scenario that the market fears the most is an unclear result so right now, given where the counting is, it's not as clear-cut as it might have been earlier in the morning," said Lachlan Shaw, head of commodity research, markets at National Australia Bank in Melbourne.
"Markets are reflecting that," he said.
U.S. crude oil stocks fell sharply last week while gasoline inventories rose, data from industry group the American Petroleum Institute showed on Tuesday.
Crude stockpiles fell by 8 million barrels last week to about 487 million barrels, the American Petroleum Institute showed on Tuesday.
That contrasted with analysts' expectations in a Reuters poll for an increase of 890,000 barrels.
More lockdowns could put a cap on oil price gains as Italy, Norway and Hungary tightened COVID-19 restrictions, following the UK, France and other countries.
Supporting prices, OPEC member Algeria backed deferring a planned increase in OPEC+ oil output from January and Russia's energy minister raised the prospect with the country's oil producers.
The Organization of the Petroleum Exporting Countries (OPEC)and allies led by Russia, a grouping known as OPEC+, are set to reduce cuts of 7.7 million barrels per day (bpd) by around 2million bpd from January.
Sources said OPEC and Russia are considering bigger production reductions next year to support prices.