Tensions in the Middle East after last week's tanker attacks, with the U.S. planning to send more troops to the Middle East, also lent support.
U.S. West Texas Intermediate crude futures rose $2.26, or 4.4pc, to $54.19 a barrel by 11:11 a.m. EDT (1511 GMT). Brent crude futures rose $1.80, or 3pc, to $62.74 a barrel.
"Had a very good telephone conversation with President Xi of China. We will be having an extended meeting next week at the G-20 in Japan. Our respective teams will begin talks prior to our meeting," Trump tweeted.
The Chinese side has not confirmed a meeting would take place. Chinese state media said Xi agreed to the meeting and emphasized in the call that economic and trade disputes should be solved through dialogue.
"Right now, this is a rumor-driven market," said Gene McGillian, vice president of market research at Tradition Energy. "There's the expectation that if you are able to reach a trade resolution, it would help global economic growth and therefore oil demand."
Fears of a confrontation between Iran and the United States have mounted since last Thursday's oil tanker attacks, which Washington has blamed on Tehran. Iran has denied involvement.
Trump would consider using military force to prevent Iran from gaining a nuclear weapon but left open the question if it involved protecting oil supplies, he told Time magazine in an interview published on Tuesday.
Iran on Monday said it would breach internationally agreed curbs on its stock of low-enriched uranium within 10 days, adding that European nations still had time to save a landmark nuclear deal.
Acting U.S. Defense Secretary Patrick Shanahan announced on Monday the deployment of about 1,000 more troops to the Middle East for what he said were defensive purposes, citing concerns about a threat from Iran.
Market participants are also awaiting a meeting between the Organization of the Petroleum Exporting Countries 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.
Russian Energy Minister Alexander Novak said on Tuesday it was too early to make any decisions about the future of the agreement because of market uncertainties.
Oil prices have fallen by more than 15pc from April's 2019 highs, partly because of concerns over the U.S.-China trade war and disappointing economic data.
High U.S. crude stockpiles, partly due to growing domestic production, has also weighed on the market. Commercial stocks were at their highest since July 2017 and about 8pc above the five-year average for this time of year, according to government data last week.
After two consecutive weeks of unexpected builds, U.S. crude stocks were forecast to have dropped by 2 million barrels last week, according to analysts polled by Reuters. Industry data is due at 4:30 p.m., followed by official estimates on Wednesday.