Oil has risen nearly two per cent after proposed trade talks between the United States and China eased some fears about a global economic slowdown, but gains were capped after the US reported a sharp build in refined product inventories.

Brent crude futures rose $US1.11, a 1.98 per cent gain, to settle at $US57.06 a barrel on Friday.

US West Texas Intermediate crude futures increased 87 cents to settle at $US47.96 a barrel, a 1.85 per cent gain.

After both benchmarks fell sharply last year, prices posted solid gains in the first week of 2019, despite recent data that added to concerns about a slowing global economy.

Brent increased about 9.3 per cent for the week, while WTI rose about 5.8 per cent.

Prices pared gains on Friday after data from the US Energy Information Administration showed a sharp increase in product inventories as refiners ramped up utilisation rates to 97.2 per cent of capacity, the highest rate on record for this time of year.

Gasoline stocks rose 6.9 million barrels last week, while distillate stockpiles grew 9.5 million barrels, the EIA said, compared with forecasts for builds under two million barrels.

US crude stockpiles were little changed.

‘Winter-grade gasoline supplies could be approaching burdensome levels if Gulf Coast runs remain elevated at a near full-out pace,’ Jim Ritterbusch, president of Ritterbusch and Associates, said in a note.

US energy firms this week cut oil rigs for the first time in three weeks, reducing the rig count by eight to 877, General Electric Co’s Baker Hughes energy services firm said.

Some analysts were forecasting the first decline in the rig count – an indicator of future production – in three years in 2019.

Oil drew support from comments by China’s commerce ministry, which said Beijing would hold vice-ministerial trade talks with US counterparts on January 7 to 8.

The news helped boost sentiment across riskier assets including the US equity and oil markets.

Washington and Beijing have been locked in a trade war for much of the past year, disrupting the flow of hundreds of billions of dollars worth of goods and hampering growth.

China’s services sector extended its expansion in December, a private survey showed on Friday, bucking a trend of downbeat economic data.

‘Recent Chinese data is not confirming the doom-and-gloom trend,’ said Olivier Jakob, oil analyst at Petromatrix.

‘And you’ve got OPEC cutting.’

A robust US jobs report also added to broader market optimism.

Despite some demand-side worries, oil has received support as supply cuts announced by the global coalition of producers known as OPEC kick in.

The Organisation of the Petroleum Exporting Countries, Russia and other non-members agreed in December to reduce supply by 1.2 million barrels per day in 2019.

OPEC’s share of that cut is 800,000 bpd.

A Reuters survey on Thursday found OPEC supply fell by 460,000 bpd in December.

The focus now will be on whether producers deliver further curbs in January to implement the deal fully.

Iraq said on Friday it was committed to the deal and would keep its oil production at 4.513 million bpd for the first half of 2019.