Oil prices extended gains on Wednesday after rising in the previous session on rekindled hopes for a U.S.-China trade deal and on the potential for conflict between the U.S. and Iran in the Middle East after tanker attacks there last week.
Brent crude futures were up 3 cents at $62.17 a barrel by 0330 GMT. They rose 2% on Tuesday.
U.S. West Texas Intermediate crude gained 12 cents to $54.02 a barrel. The U.S. benchmark surged 3.8% in the last session.
In a post on Twitter, U.S. President Donald Trump said preparations were starting for him to meet Chinese President Xi Jinping at the G20 summit in Osaka, Japan, next week.
That comes after talks to reach a broad deal on trade between the United States and China broke down last month after Washington accused the Chinese of backing away from previously agreed commitments.
Interaction between the two sides since then has been limited, and Trump has threatened, repeatedly, to slap more tariffs on Chinese products in an escalation that businesses in both countries want to avoid.
"Global demand for crude got a boost on expectations that trade talks are showing some positive signs following President Trump's tweets," said Edward Moya, senior market analyst at OANDA in New York.
Both oil benchmarks gave up earlier gains in the Asian session after data showed that Japan's exports fell for a sixth straight month in May as China-bound shipments weakened, underlining the impact of the trade war.
Tensions in the Middle East after last week's tanker attacks remain high, with Trump saying he was prepared to take military action to stop Iran having a nuclear bomb but leaving open whether he would sanction the use of force to protect Gulf oil supplies.
Fears of a confrontation between Iran and the United States have mounted since last Thursday's attacks, which Washington has blamed on Tehran. Iran has denied involvement.
Iran said this week it would breach internationally agreed curbs on its stock of low-enriched uranium within 10 days, possibly paving the way for the country to develop a nuclear weapon, adding that European nations still had time to save a landmark nuclear deal.
The U.S. is deploying about 1,000 more troops to the Middle East for what Washington said were defensive purposes, citing concerns about a threat from Iran.
Market participants are also waiting for a meeting between the Organization of the Petroleum Exporting Countries (OPEC) and other producers including Russia, a group known as OPEC+, to decide whether to extend a supply reduction pact that ends this month.
OPEC and non-OPEC states are discussing holding meetings on July 10-12 in Vienna, a date range proposed by Iran, OPEC sources said on Tuesday. OPEC itself, however, is considering meeting on July 1-2 though it is still saying meeting will be held on June 25-26 on its website.
U.S. crude stocks also fell by 812,000 barrels last week to 482 million, industry group the American Petroleum Institute said on Tuesday.
The report from the government's Energy Information Administration are due later on Wednesday.