Brent crude futures, the international benchmark for oil prices, were up 52 cents, or 1.1 percent, at $48.94 per barrel at 2:35 p.m. (1835 GMT). U.S. West Texas Intermediate (WTI) crude futures rose 46 cents, or 1 percent, $46.54.
Prices briefly pulled back after Baker Hughes reported its weekly count of oil rigs operating in the United States jumped by 2 rigs to a total of 765. The rig count has only dipped twice this year, but has shown signs of plateauing recently.
"It's been a jumpy Friday in the oil market," said Ole Hansen, head of commodity strategy with Saxo Bank, adding that the volatility was "primarily driven by traders covering what up until recently was an extended short position."
Prices spiked earlier in the day following a force majeure declaration on exports of Nigeria's Bonny Light crude, but sank into negative territory after data showed U.S. retail sales unexpectedly fell in June, casting doubt on demand in the world's largest oil consumer.
Both contracts rose about 5 percent this week, aided by reports of accelerating demand growth from the International Energy Agency, 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 same period in 2016, customs data showed. Asian traders are selling oil products out of tanks amid 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 "so long OPEC does not significantly increase its output any further."
Still, oil stocks remained comfortably above the five-year average, and prices are more than 16 percent below their 2017 highs, despite an extension to March 2018 of output cuts of 1.8 million barrels per day (bpd) coordinated by the Organization of the Petroleum Exporting Countries.
"For the first half of 2017, OECD inventories are likely to finish higher, rather than lower ... The most plausible explanation is that OPEC compliance has been not as high as has been suggested," brokerage firm Sanford C. Bernstein said.
"OPEC will have to cut deeper and for longer if it wants to eliminate the inventory overhang and prices to rise," Bernstein said.
Crude prices are around levels in late November last year, when a group of oil producers including Russia and OPEC pledged to withhold around 1.8 million barrels per day (bpd) of output between January this year and March 2018 to tighten the market.
OPEC's rebalancing effort has been stymied in part by rising output from Libya and Nigeria, which were exempt from cuts and were producing close to 700,000 bpd more than at the time of the initial November OPEC cut agreement, according to U.S. investment bank Jefferies.
Kuwait's OPEC governor told Reuters in an interview that it would be premature to cap Nigerian and Libyan oil production.
U.S. oil production has also risen by more than 10 percent over the past year to 9.4 million bpd.
"It's not too long before the market starts looking at the supply situation ... which is anything but encouraging," Varga said.
Goldman Sachs said that the crude oil price outlook remained weak, largely due to rising cost efficiency from U.S. shale drillers.
"We see potential for shale to break even at $45 ... (and) we see $45-$55 per barrel annual WTI range," the U.S. investment bank said.
More about: #oil