West Texas Intermediate (WTI) crude climbed 85 cents, or 1.5%, to $58.68 by 0541 GMT. Brent was up 64 cents, or 1%, at $64.80, having earlier hit $64.95.
The U.S. and global benchmarks have gained this year as the Organization of the Petroleum Exporting Countries (OPEC) and big producers such as Russia have curbed output to bolster prices.
However, ongoing trade tensions have raised fears about weaker demand, and investors have been on the lookout for signs that rapidly increasing U.S. production is being consumed.
U.S. crude stockpiles fell more than forecast last week, while gasoline inventories decreased and distillate stocks built, data from industry group the American Petroleum Institute (API) showed on Tuesday.
Crude inventories fell by 8.1 million barrels in the week to July 5 to 461.4 million, compared with analyst expectations for a decrease of 3.1 million barrels, according to the data.
Official figures from the government's Energy Information Administration (EIA) are due later on Wednesday.
"Prices are finely balanced right now as investors await fresh stimulus," said Fawad Razaqzada, technical analyst at FOREX.com. "The stimulus could come in the form of a sharp change in U.S. crude oil inventories."
U.S. oil was also supported as major producers began evacuating and shutting in production in the Gulf of Mexico as a tropical disturbance may become a storm later on Wedesday or Thursday.
Oil prices have been under pressure from concerns about global economic growth amid growing signs of harm from the U.S.-China trade war that has rumbled on over the last year. Lower economic growth typically means reduced demand for commodities such as oil.
"Global economic growth remains under pressure, with the latest manufacturing surveys weakening," NAB said in a note.
"This is likely to impact demand for commodities, although stimulus measures may in some cases support commodity demand," NAB said, citing China as an example.
Still, U.S. crude oil production is forecast to rise to a record of 12.36 million barrels per day (bpd) in 2019 from the high of 10.96 million bpd last year, the EIA's Short Term Energy Outlook said on Tuesday.
OPEC and allied producers led by Russia agreed last week to extend their supply-cutting deal until March 2020. Brent has risen nearly 20% in 2019, supported by the pact and tensions in the Middle East, especially the row over Iran's nuclear programme.