Brent crude futures rose 74 cents to settle at $72.90 a barrel, a one percent gain. The contract hit a session low of $71.19 a barrel, its lowest since April 17.
West Texas Intermediate (WTI) crude futures rose 68 cents, or one percent, to settle at $68.76 a barrel.
US crude stocks surprised the market and rose by 5.8 million barrels last week as oil production hit 11 million barrels a day for the first time ever, the Energy Information Administration said on Wednesday.
Net US crude imports rose last week by 2.2 million barrels per day, the data showed.
"Weekly shifts in the US crude stocks are being increasingly influenced by international trade and this was certainly the case with this week's data," Jim Ritterbusch, president of Ritterbusch and Associates said in a note. "While we had expected a pop in imports and a drop in exports, changes in both categories far exceeded our expectations especially on the import side."
Crude futures extended losses immediately following the data release, before edging higher as the market weighed some of the more supportive points in the report, such as a larger-than-expected draw in gasoline stocks.
Gasoline inventories fell by 3.2 million barrels, while distillate stockpiles, which include diesel and heating oil, fell by 371,000 barrels, the EIA data showed.
Oil markets have fallen over the last week as Saudi Arabia and other members of the Organization of the Petroleum Exporting Countries and Russia increased production and as some supply disruptions eased.
OPEC and non-OPEC's compliance with oil output curbs has declined to around 120 percent in June from 147 percent in May, two sources familiar with the matter told Reuters on Wednesday.
Investors have also begun to worry about the impact on energy demand of the trade dispute between the United States and its trading partners, including China.
Trade tension between the United States and China could drag on the global economy, BMI Research said.
"The economic outlook is broadly positive, but a number of headwinds are emerging, not least a stronger dollar, rising inflationary pressures and tightening liquidity," BMI said. "Slowing trade growth will weigh on physical demand for oil."
Kansas City Federal Reserve Bank President Esther George said on Tuesday uncertainty over US trade policy could slow the economy, even if recently imposed tariffs are too small to have a big impact.
Trade policy was a "significant" downside risk to the outlook for economic growth, George said.