Oil rose 1 percent on Friday, boosted as U.S. crude producers added only two rigs in the latest week and on signs of increased Chinese demand, but trading was volatile as global supply remained strong.
Brent crude futures LCOc1, the international benchmark for oil, settled up 49 cents, or about 1 percent, at $48.91 per barrel.
U.S. West Texas Intermediate (WTI) crude futures CLc1 settled up 46 cents, or 1 percent, at $46.54 per barrel.
U.S. crude rose more than 5.2 percent for the week while Brent rose more than 4.7 percent.
"I think the big driver is inventory numbers," said Stewart Glickman, head of energy research at CFRA Research in New York, "We've finally broken below 500 million barrels, I feel like it's a psychological barrier."
U.S. crude inventories fell 7.6 million barrels last week, its biggest weekly plunge in 10 months, the U.S. Energy Information Administration (EIA) said on Wednesday.
And while U.S. energy firms added oil rigs for a second week in a row according to Friday data from Baker Hughes, the pace of additions has slowed to its lowest this year.
Oil production in North Dakota fell 10,000 barrels-per-day in May.
Still, oil stocks remained comfortably above the five-year average, and prices were more than 15 percent below their 2017 highs.
Output cuts from producing countries coordinated by the Organization of the Petroleum Exporting Countries have been stymied by rising output from Libya and Nigeria, which are exempt. June compliance among other members also fell to just 78 percent, according to the International Energy Agency (IEA).
Kuwait's OPEC governor told Reuters in an interview that it would be premature to cap Nigerian and Libyan oil production.
Money managers raised their net long U.S. crude futures and options positions in the week to July 11, the U.S. Commodity Futures Trading Commission (CFTC) said on Friday.
Brent and WTI prices were roughly 5 percent above the week's lows, aided by reports of accelerating demand growth from the IEA, crude oil import growth in China and falling crude stocks in the United States.
China's crude oil imports over the first six months of 2017 were 13.8 percent above the year-ago period, customs data showed. Asian traders are selling oil products out of tanks to meet soaring demand, while the EIA reported the largest drop in U.S. crude oil inventories in the week to last week in 10 months.
Analysts at Commerzbank said a reduction in the developed world's oil stocks was likely to continue as long as OPEC did not further significantly increase its output.