Oil rose towards $65 a barrel on Tuesday as OPEC supply cuts and Middle East tensions outweighed the U.S.-China trade dispute that has been dragging down the global economy and oil demand.
OPEC and its allies led by Russia agreed last week to extend their supply-cutting deal until March 2020. Brent has risen almost 20% in 2019 supported by the pact and also tensions in the Middle East, especially concerns about the row over Iran's nuclear program.
Benchmark Brent crude rose 33 cents to $64.44 a barrel by 1211 GMT. U.S. West Texas Intermediate crude was up 26 cents to $57.92.
"OPEC and its allies are doing their best to support the market," said Tamas Varga, an analyst with PVM.
"Oil prices are to hold up reasonably well during coming months or at least they are not to fall out of bed."
Rising tensions between Iran and the United States have brought the two countries close to conflict. Last month, President Donald Trump called off air strikes at the last minute in retaliation for Iran shooting down a U.S. drone.
The European Union on Tuesday urged Iran to reverse its scaled up uranium enrichment that breaches a nuclear deal it agreed in 2015 with world powers. Washington withdrew from the accord last year and re-imposed sanctions.
Oil also gained support from reports expected to show a drop in U.S. crude inventories.
U.S. crude stockpiles are forecast to fall 3.6 million barrels. The first of this week's two supply reports is due at 2030 GMT from the American Petroleum Institute, an industry group.
Russian oil output fell close to a three-year low in early July, industry sources told Reuters, dragged down by declining output from the largest producer Rosneft.
The decline follows the discovery of contaminated Urals crude that affected the Druzhba pipeline to Europe.
"The Russian story definitely supports prices today. Market participants remain concerned that Russian compliance could deteriorate again, and lower Russian output together with elevated compliance from OPEC nations should rebalance the oil market faster," said Giovanni Staunovo, oil analyst for UBS.
While supply and security concerns supported the market, gains were capped by the U.S.-China trade war that has dampened prospects for global economic growth.
The world's two largest oil consumers are set to relaunch trade talks this week, although there are few signs their differences have narrowed a year after the dispute erupted.
(Additional reporting by Aaron Sheldrick; Editing by Kirsten Donovan and Edmund Blair)