Oil prices ended the week firmer Friday, lifted by a recovery in share prices in China, which is the world's biggest consumer of energy and major buyer of commodities generally.
The crude market won a boost also from surging European stock markets, that were lifted mainly by hopes of a deal between Greece and its creditors.
The International Energy Agency meanwhile forecast that global oil demand growth would slow in 2016 and that oil production in nations outside the Organization of the Petroleum Exporting Countries (OPEC) would stall.
In its first estimates for 2016, the IEA forecast that oil demand would slow next year to 1.2 million barrels per day, compared with an average of 1.4 million barrels per day this year.
Meanwhile growth in non-OPEC oil supply "is expected to grind to a halt in 2016 as lower oil prices and spending cuts take a toll", the IEA said in its monthly oil report.
In trading Friday, US benchmark West Texas Intermediate for delivery in August climbed 42 cents to $53.20 a barrel compared with Thursday's close.
Brent North Sea crude for August advanced 62 cents to stand at $59.23 a barrel in London afternoon deals.
- Chinese turbulence -
US crude futures had sunk nearly eight percent Monday on worries about slowing global growth, as Greek voters rejected a bailout offer and China moved to calm financial market turbulence.
"There are some signs that foreign investors are more optimistic about China's efforts to arrest the stock slide," said Bernard Aw, market strategist at IG Markets.
"However, I feel much caution should be exercised and it is important to observe the Chinese markets in the coming sessions before calling it a bottom."
Aw added: "As we have seen in the past, Chinese equities may recover in one session, only to fall straight back into a downward spiral the next day."
Chinese stocks surged for a second day on Friday as a government rescue plan offered a respite from a month-long rout.
In a rollercoaster week, the Shanghai market gained 5.18 percent overall, after the government announced additional policies to avoid a market crash.
But it is still down 24.9 percent from its closing peak on June 12.
The stock market slide of recent weeks was a dramatic reversal of a 150-percent charge in the 12 months to its peak last month, fuelled by tens of millions of retail investors using borrowed funds.
China's economy, the world's second largest, is already faltering. Gross domestic product expanded 7.4 percent in 2014, the slowest pace since 1990, and weakened further in the first three months of this year.
But the International Monetary Fund said Thursday that there was no reason to lose faith in China's economy because of the bursting stock market bubble.
-- Greek relief --
The oil market was focused also on Greece amid hopes debt-strapped nation would reach a deal with its creditors after Athens laid out details Thursday of a new bailout plan to save it from financial collapse.
The package involves a pensions overhaul and tax hikes in return for debt relief and a rescue loan from the eurozone.
Traders are also keeping an eye on negotiations in Vienna between western powers and Iran on a deal to curb Tehran's nuclear ambitions and allow the lifting of punishing sanctions.
Global powers leading the negotiations sought to ramp up the pressure for a deal, but Iranian Foreign Minister Mohammad Javad Zarif hit back, saying Western countries among the so-called P5+1 group on the other side of the talks were backtracking on previous commitments.
A lifting of sanctions will allow Iranian oil to flow back into the global market, adding to a supply glut and helping depress prices, according to analysts.
Meanwhile US commercial crude stockpiles rose another 400,000 barrels to 465.8 million barrels in the week to July 3, even as refineries picked up activity. Gasoline inventories also jumped, with the summer holiday driving season in full swing.