Oil prices rose Thursday, clawing back ground after recent sharp losses, while gains were capped by concerns surrounding the impact of China's and Greece's problems on crude demand, analysts said.
US benchmark West Texas Intermediate for August delivery won 72 cents to $52.37 a barrel.
Brent North Sea crude for August rose 41 cents to stand at $57.46 a barrel nearing midday in London.
"Rising uncertainties from the Greek debt bailout and China's stock market turmoil put global demand at risk," said EY analyst Sanjeev Gupta.
Commodity prices have fallen sharply this week with crude prices suffering their largest sell-off for a number of months.
Chinese share prices have meanwhile taken a severe beating despite some respite Thursday, after government measures failed to staunch the bloodletting that has wiped out around a third of China's main share market in under a month.
China's benchmark Shanghai stock index surged Thursday after the government issued more policies to halt a market slide, but analysts said it was unclear whether the rally would be sustained.
In Europe, Greece's future in the eurozone is at risk after European leaders gave the debt-stricken nation a final deadline of Sunday to reach a bailout reform deal.
Traders were keeping a close eye also on intense negotiations in Vienna between the West and Iran on curbing Tehran's nuclear ambitions, said Gupta.
An agreement with Iran would see the West lift punishing economic sanctions that have restricted the country's oil exports.
"An outflow of Iranian oil could put downside pressure on crude prices in a global market that is already oversaturated by a glut of oversupply," Gupta said.
US oil prices dropped for the fifth straight trading session Wednesday as domestic crude stockpiles rose again.
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.
US crude futures meanwhile 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.