Prices have been buoyed by a rally in US gasoline futures, OPEC deal and fall in US inventories
Oil prices dip but stay near eight-week highs on US stock declines
Oil prices edged lower on Friday but were still near 8-week highs, buoyed by a decline in US inventories and OPEC's ongoing efforts to curb production.
Brent crude futures were down 6 cents, or 0.1 percent, at US$51.43 per barrel at 0251 GMT.
US West Texas Intermediate (WTI) crude futures were down 5 cents, or 0.1 per cent, at $48.99 per barrel.
Both benchmarks rose to their highest levels since May 31 in the previous session, buoyed by a rally in US gasoline futures after earlier support from OPEC's latest efforts to cut exports and a sharp fall in US crude inventories.
"Crude oil prices rose further as the focus remained on fundamentals. This week's better-than-expected inventory drawdown in the United States continued to support prices," ANZ bank said in a note.
US crude stocks fell sharply by 7.2 million barrels in the week to July 21 due to strong refining activity and an increase in exports, according to data from the Energy Information Administration (EIA).
"Following seasonal norms we expect further declines in crude inventories over August and September," BMI Research said.
Brimming US crude supplies have been a challenge to production cuts to prop up prices led by OPEC.
US crude oil production has been on the rise since mid-2016, but it dropped to 9.41 barrels per day (bpd) in the week to July 21, from 9.43 million bpd the week before. The decline was mainly due to a fall in Alaskan output, ANZ bank said.
Jeffrey Halley, senior market analyst at OANDA, said the market would watch US rig count data for further signs of slowing drilling activity, as well as potential US sanctions on Venezuela's oil sector.
"Both developments should be bullish for oil," he said.
Oil prices have been supported by a further agreement between OPEC and some non-OPEC members to limit Nigerian oil output and encourage several members to comply with their pledged production cuts.
Since the world's major oil producers held a meeting in St Petersburg on Monday, crude prices have risen some 6 per cent on expectations of deepening cuts.
Saudi Arabia, OPEC's de facto leader, said it planned to cap crude exports to 6.6 million bpd in August, about 1 million bpd below the level last year.