U.S. crude ended Wednesday's session at a two-week high, jumping $2.02, or 3.1 percent, to settle at $67.87. Brent crude, the international benchmark, rose $2.15, or 3 percent, to $74.78 a barrel by 2:29 p.m. ET.
U.S. crude inventories fell 5.8 million barrels last week, the Energy Information Administration said, exceeding the 1.5 million-barrel draw forecast by analysts polled by Reuters.
Refinery crude runs slipped 89,000 barrels per day from the previous week's record high to 17.9 million bpd, EIA data showed. Refinery utilization rates remained unchanged last week at 98.1 percent of total capacity, the highest rates since 1999.
"As refinery runs continue to kick around close to a record high - easing just 89,000 bpd last week - and as imports have dropped off on the prior week, crude inventories have shown a solid draw, particularly on the U.S. Gulf Coast," said Matt Smith, director of commodities research at ClipperData.
A weaker dollar makes oil less expensive for buyers using other currencies.
The prospect of a drop in oil exports from Iran, the third-largest producer in the Organization of the Petroleum Exporting Countries, in response to new U.S. sanctions is also supporting the market.
European oil companies have started to cut back on Iranian purchases, although Chinese buyers are shifting their cargoes to Iranian-owned vessels to keep supplies flowing.
"The Iran issue continues to occupy traders' minds," said Greg McKenna, chief market strategist at futures brokerage AxiTrader.
OPEC has started to boost supplies following a deal with Russia and other allies in June, although producers have been cautious so far. Saudi Arabia told OPEC it cut supply in July, rather than increasing output as expected.
Signs of tighter supply countered concern about slowing oil demand stemming partly from the trade dispute between the United States and China, the world's two largest economies.
U.S. and Chinese officials were set to resume talks on Wednesday, but Trump has predicted there will be no real progress.
— CNBC's Tom DiChristopher contributed to this report.