Oil prices erased earlier losses on Thursday as Middle East tensions and Saudi comments about ending a global supply glut offset an unexpected increase in U.S. crude inventories and high U.S. production and exports.
Brent crude rose 85 cents, or 1.5 percent, to $59.29 a barrel by 2:28 p.m. ET (1828 GMT). The global benchmark is not far below its 26-month high of $59.49 hit in late September.
U.S. light crude ended Thursday's session 46 cents higher at $52.64, striking a new six-month closing high.
Saudi Arabia's energy minister earlier this week reiterated the kingdom's determination to end a global supply glut that has weighed on prices for more than three years. The Saudis have spearheaded an agreement among OPEC and other oil exporters to keep 1.8 million barrels a day off the market.
The deal runs through March, and OPEC could agree to extend the accord through the end of 2018 at its Nov. 30 meeting.
"Price volatility in the oil market is expected to persist in the run-up to the November OPEC meeting. Saudi Arabia's bullish stance, together with ongoing geopolitical tensions in the Middle East, will remain supportive of prices," said Abhishek Kumar, senior energy analyst at Interfax Energy's Global Gas Analytics in London.
"However, the market is also mindful of rising oil production in the United States and persistently high exports from the country, which will cap price gains," Kumar noted.
U.S. crude inventories rose by 856,000 barrels last week, U.S. Energy Information Administration (EIA) data showed on Wednesday, versus analysts' forecast for a 2.6 million-barrel draw.
Offsetting that increase, the EIA data showed inventories of gasoline and distillate fuel, which includes heating oil and diesel, both fell by more than 5 million barrels. The fuel inventories dropped despite a rise in refining output.
The data also showed that U.S. crude production rose 1.1 million barrels per day (bpd) last week to 9.5 million bpd, recovering from a decline due to Hurricane Nate. Meanwhile, U.S. oil exports hit a new record four-week average of 1.7 million bpd.
"We continue to highlight a near record level of crude exports that appears sustainable near 2 (million bpd) through next month due to a widening Brent-WTI spread that pushed above $6 per barrel resistance in yesterdays trade," Jim Ritterbusch, president of Chicago-based energy advisory firm Ritterbusch & Associates, said in a note.
U.S. crude becomes more attractive to international buyers when it trades at a discount to Brent.
Brent's premium over WTI was up 1.5 percent on Thursday at $6.35 amidst renewed strength in the global benchmark. Ritterbusch said he expects December Brent to make a run at $59 by the end of the week.
But higher U.S. supply has been balanced by worries over crude exports from the Middle East.
Crude shipments to Turkey from northern Iraq, the second-largest producer in OPEC, have declined after Iraqi government forces took back the city of Kirkuk last week after a Kurdish referendum on independence.
Meanwhile, global oil demand keeps rising.
Southeast Asia's net crude oil imports will more than double to 5.5 million bpd by 2040 as the region adds new refining capacity to meet rising demand while regional oil output falls, according to the International Energy Agency (IEA).
— CNBC's Tom DiChristopher contributed to this report.