Oil Rises on China Optimism

Brent crude oil inched up to trade near $107 a barrel on Friday, ending days of declines after promising Chinese data suggested the economy of the world's top energy consumer was stabilising.

Although an imminent rebound for China is still unlikely, steady consumer inflation in July offered some hope to markets already buoyed by strong trade numbers.

China's commodity imports saw an overwhelming increase in July, with crude oil, iron ore and soybean shipments all climbing to record highs, although its implied oil demand softened from a 4-month high in June.

Concern that disruptions to oil supplies in Libya and other OPEC producers could persist or even worsen were also supporting prices, analysts said.

A report from the International Energy Agency suggested on Friday America's shale oil boom was protecting the world from steep oil price spikes as several OPEC members struggle to maintain production due to unrest and infrastructure problems.

"Stronger than expected Chinese data and continued supply issues are supporting prices,' said Commerzbank analyst Carsten Fritch.

Brent crude for September was at $107.00, up 30 cents, by 0806 GMT, after settling at its lowest level since July 4 in the previous session. U.S. crude was at $103.30, up 43 cents, at 0907 GMT snapping five days of losses -- its longest losing streak this year.

Despite the price rebound, both benchmarks were set to post weekly losses as investors took profits ahead of September, when the U.S. Federal Reserve is expected to start paring back its massive stimulus programme.

"The market is factoring in a September pullback in the Fed's asset purchase programme," ANZ analyst Natalie Rampono said. "There could potentially be more profit-taking."

The Fed's move could tighten liquidity that has underpinned global markets, leading to a firmer dollar and weighing on commodities priced in the greenback by making them more expensive for holders of other currencies.

Workers' protests have already slashed Libya's oil output to the lowest levels since the 2011 civil war and more than halved its exports.

Pipleline attacks in Iraq's north have pushed output down and planned work at the southern shipping terminals in September could slash exports by up to 500,000 barrels per day, the IEA said.

(Additional reporting by Florence Tan)