U.S. West Texas Intermediate (WTI) crude
Both benchmarks posted third straight weekly declines, with Brent losing about 3 percent and WTI nearly 0.4 percent.
Crude prices were pushed higher by a rally in the U.S. equities market on Friday, markets participants said. Oil prices have tracked closely with Wall Street, and both asset classes saw volatile sessions throughout the week.
Oil prices fell to their lowest in a year and a half earlier this week and are down more than 20 percent for 2018, depressed in part by rising supply.
U.S. crude inventories
The crude draw "failed to spur much buying interest," Jim Ritterbusch, president of Ritterbusch and Associates, said in a note. "Nonetheless, we viewed the data as price supportive with the exception of the 3 million barrel gasoline supply build."
U.S. energy firms added two oil rigs in the week to Dec. 28, General Electric Co's
The United States has emerged as the world's biggest crude producer this year, pumping 11.6 million barrels per day (bpd), more than Saudi Arabia or Russia. Oil production has been at or near record highs in the three countries.
This month, the Organisation of the Petroleum Exporting Countries and its allies including Russia agreed to cut output by 1.2 million bpd, or more than 1 percent of global consumption, starting in January.
Russian Energy Minister Alexander Novak said on Thursday that Russia would cut its crude output by between 3 million and 5 million tonnes in the first half of 2019 as part of the deal.
Novak also told reporters the U.S. decision to allow some countries to trade Iranian oil after putting Tehran under sanctions was one of the key factors behind the OPEC deal.
Imports of Iranian crude oil by major buyers in Asia hit their lowest level in more than five years in November as the U.S. sanctions on Iran's oil exports took effect, government and ship-tracking data showed.