U.S. oil closed marginally lower after a volatile session on Wednesday, while benchmark Brent traded flat after rising on worries about Russian airstrikes in Syria.
Oil prices were broadly boosted in early trade by concern about a hurricane threatening energy infrastructure on the U.S. East Coast. Book balancing by traders at the end of the month and the third quarter also made for choppy trade.
"It's the typical month-end, quarter-end 'window dressing' phenomenon," Tariq Zahir, a fund manager in oil at Tyche Capital Advisors in Laurel Hollow, New York, said, noting that similar action at end-August resulted in an 8 percent price rally.
Warplanes from Russia carried out air strikes against Islamic State targets in Syria, feeding worries about growing war in the Middle East.
The U.S. National Hurricane Center said it expected Hurricane Joaquin to reach the Bahamas on Wednesday night. The storm might move north to threaten the New York Harbor, delivery point for the U.S. gasoline and ultra low sulfur diesel futures contracts.
"Hurricane Joaquin may be having an effect on the market. High seas along the East Coast have been forecast and that could affect barges carrying refined products," said David Thompson, executive vice-president at Washington-based commodities broker Powerhouse.
Oil prices slid earlier after U.S. government data showed a 4 million-barrel crude inventory build last week, versus a forecast by analysts in a Reuters poll for a rise of just about 1 million barrels.
Gasoline stockpiles rose more than 3 million barrels, compared with the poll's forecast for a 40,000-barrel draw.
But the EIA also announced drawdown of 1 million barrels at the Cushing, Oklahoma, delivery hub for the U.S. crude oil futures contract. U.S. crude got a brief boost from the Cushing storage data, which is key to the market's psyche.
"The large crude oil inventory build, driven by a drop in the refinery utilization rate, makes for a bearish report," said John Kilduff, partner at Again Capital LLC in New York.
Separately, the EIA said U.S. oil output in 2016 was expected to be at just under 9 million barrels per day. It was the second time in two months that the EIA slashed its production forecast by 400,000 bpd.