Oil prices hit session highs on Wednesday, rising to their highest since June, after the U.S. government reported another surprise weekly drawdown in crude inventories.
Brent crude rose , 89 cents, or 1.8 percent, to $51.76 a barrel at 3:22 p.m. ET (1932 GMT), off a nearly four-month of $52.09 struck earlier in the session.
U.S. crude settled up $1.14, or 2.3 percent, at $49.83, after earlier rising to $49.97, its highest level since June 29.
U.S. crude inventories dropped by 3 million barrels to a total of 499.7 barrels in the week through Sept. 30, U.S. Energy Information Administration (EIA) reported Wednesday. That marked a fifth straight weekly drop.
Analysts polled by Reuters had forecast a build of 2.6 million barrels. But the American Petroleum Institute (API), a trade group, on Tuesday set market expectations for an inventory decline by reporting a 7.6 million-barrel drop.
"Hence positive news has already been baked in the cake, and prices could ease lower from here, especially given the rampant rally of recent days," said Matt Smith, analyst at New York-based Clipperdata, which analyses data and impact from crude cargoes and supplies.
The drawdown came even as refineries cut output and as imports of crude oil fell by 125,000 barrels a day.
Gasoline stocks rose by 222,000 barrels, compared with analyst expectations in a Reuters poll for a 702,000-barrel gain.
Distillate stockpiles, which include diesel and heating oil, fell by 2.4 million barrels, versus expectations for a 700,000-barrel drop, the data showed.
OPEC and non-OPEC oil producers plan an informal meeting in Istanbul Oct. 8-13 to discuss how to implement a production deal OPEC members reached in Algiers last month, Algerian Energy Minister Nouredine Bouterfa has told local Ennahar TV.
In an interview scheduled be broadcast on Thursday, Bouterfa said the Algiers deal to cut output would be in force for up to a year.
Brent has risen from below $49 on Sept. 28, when the Organization of the Petroleum Exporting Countries agreed a surprise cut in its output to support prices which are less than half the level of mid-2014.
Under the deal, OPEC will target production of between 32.5 million barrels per day (bpd) and 33 million bpd, implying a cut of as much as 740,000 bpd from the August level, as reported in OPEC's monthly report.
OPEC's decision to embrace production cuts will help move crude prices toward a target of $50 to $60 per barrel, Gary Ross, chairman of consultancy PIRA Energy Group, told reporters on Wednesday.
The move marked an about-face by OPEC, which in November 2014 dropped its role of cutting production. Although it hasn't yet worked out all the details, and analysts are skeptical the cut will be implemented, the deal is supporting the market.
"The mere threat of a production cut should put a floor under oil prices until the next OPEC meeting on Nov. 30," said Jason Gammel of U.S. investment bank Jefferies.
Top oil exporter Saudi Arabia has cut the price of flagship crude grade Arab Light to its Asian customers for November, state oil giant Saudi Aramco said on Wednesday, tracking weakness in the Dubai benchmark.
— CNBC's Tom DiChristopher contributed to this report.