Oil prices rose in choppy trading on Friday, a day after its biggest gains in a month, as a weaker U.S. dollar helped support crude.
Baker Hughes reported that U.S. crude oil rigs rose by 15 this week, and now total 396. This time last year, there were 672 oil rigs in production, Baker Hughes said. Oil prices pared gains after the data showed the seventh consecutive week of added rigs.
Brent crude futures were up 87 cents, or 1.87 percent, to $46.90 per barrel. It was up about 5.7 percent on the week.
U.S. West Texas Intermediate (WTI) crude settled at $44.49 a barrel, up $1, or 2.3 percent - marking a three week high.
The dollar weakened after U.S. retail data showed sales were flat for July, against expectations of a modest rise. A weaker greenback makes dollar-denominated crude more affordable to holders of other currencies.
Both price benchmarks rose more than 4 percent on Thursday after Saudi Arabia's energy minister Khalid al-Falih said that oil producers would discuss potential action to stabilize oil prices during a meeting next month in Algeria.
"Yesterday was a big move in reaction to the Saudi oil minister's comments. Now today there is a reassessment but the comments are probably not enough to trigger a sustained rally," Olivier Jakob of consultancy Petromatrix in Zug, Switzerland said.
An outlook published by the International Energy Agency (IEA) that said it expected the supply and demand balance to tighten towards year-end also supported prices.
Traders said a drop of 8.1 percent in China's oil output in July, to a five-year low of 16.72 million tons, also lifted prices because it would mean Asia's biggest economy has to import more crude.
However, China's implied oil demand fell 0.1 percent from a year ago to 10.11 million barrels per day, its lowest since August 2014.
Despite the output fall in China, the world's biggest energy consumer, the market impact is mixed as its refined product exports are increasing.
"To be bullish, there would also need to be a drop in refining output," Jakob of Petromatrix said.
Oil prices are still more than 12 percent below their last peak in June, as brimming storage tanks and production that exceeds consumption weighs on markets.
Iran slashed its September official selling price for light crude to Asia by $1.30 a barrel, the latest sign that exporters are willing to accept discounts in return for market share.
AB Bernstein said global oil production rose almost 0.8 million barrels per day (bpd) in July from the previous month, to 97.01 million bpd, while commercial inventories increased by 5.7 million barrels to 3.09 billion barrels in June.
Despite cheap crude feedstocks prices, analysts said refinery margins, known as cracks, were poor as refiners continued to make more fuel than the market can absorb.
For July, Bernstein put Brent cracking margins at $3.02 per barrel (down $1.83 from June); U.S. Gulf Coast cracking margins at $5.06 a barrel (down $0.03); and Singapore cracking margins at $4.74 per barrel (down $1.03).
— CNBC's Tom DiChristopher contributed to this report.