Oil prices got support on Thursday from gains in U.S. equities markets as trade tensions between China and the United States eased, but the advance was limited by strength in the dollar.
WTI and Brent had hit two-week lows on Wednesday after China proposed a broad range of tariffs on U.S. exports, feeding fears of a trade war.
After a day of concern over tit-for-tat responses between the United States and China over tariffs on various products, market nerves were calmed as U.S. officials said the countries could negotiate.
"Oil prices are profiting from the general brightening of sentiment on the markets as signs emerge that the trade dispute is easing between the U.S. and China," analysts at Commerzbank said in a note.
The strength of the U.S. dollar was a headwind for oil, said Bill Baruch, president of Blue Line Futures in Chicago.
The U.S. dollar rose to a more than one-month high against a basket of major currencies. Because oil is dollar-priced, a stronger greenback makes purchases in other currencies more expensive and exerts downward pressure on oil.
Oil prices have moved in tandem with the U.S. stock market throughout the year, though that relationship has broken down somewhat in the last few weeks. All three major U.S. stock indexes were higher on Thursday, after the United States said it could negotiate with China on trade issues.
Oil was also supported by an unexpected decline in U.S. crude inventories Wednesday. The U.S. Energy Information Administration said inventories fell by 4.6 million barrels in the most recent week, compared with expectations for an increase of 246,000 barrels.
U.S. crude production hit a new high, but that was not enough to change the overall bullishness of the report, said Baruch.
The extent to which U.S. production increases counterbalances output cuts from the Organization of the Petroleum Exporting Countries will be critical, said Gene McGillian, manager of market research at Tradition Energy in Stamford.
The energy minister of OPEC member Qatar told Reuters that organization and its allies should maintain supply cuts.
OPEC and its allies are collectively curbing 1.8 million barrels per day of crude output to help eliminate a global oil glut. The cuts run until the end of 2018 but Saudi Arabia has said they could be extended in some form into 2019.
Oil has also received support after a Reuters survey showed on Wednesday that OPEC output fell in March to an 11-month low due to declining Angolan exports, Libyan outages and a further slide in Venezuelan production.
— CNBC's Tom DiChristopher contributed to this report.