The OPEC oil cartel defied expectations Wednesday and nailed down its first joint output cut since 2008 after tough talks in Vienna, sending oil prices soaring.
At 1622 GMT Brent North Sea crude for January delivery was up $3.77 at $50.15, the first time it has risen above $50 in a month. West Texas Intermediate was up $3.98 at $49.21.
The accord announced by the Organization of the Petroleum Exporting Countries is aimed at reducing a global supply glut that has kept prices painfully low.
It represents a dramatic reversal from OPEC's Saudi-led strategy, introduced in 2014, of flooding the market to pressure rivals, in particular US shale oil producers.
The cartel will lower its monthly output by 1.2 million barrels per day (bpd) to 32.5 million bpd from January 1, Qatar's energy minister and president of the OPEC conference said.
"This is a major step forward and we think this is a historic agreement, which will definitely help rebalance the market and reduce the stock overhang," Mohammed Bin Saleh Al-Sada told a news conference in Vienna.
He also said that the deal will help lift global inflation accelerate to a "more healthy rate," including in the United States.
It finalises a preliminary deal struck in September in Algeria when OPEC agreed to cut production but left the details to clear up later.
Negotiations got bogged down in a game of poker between OPEC's three biggest producers, Saudi Arabia, Iraq and Iran, on who would do the heavy lifting.
Iraq had said it did not want to pump less crude because it was short of money to fight Islamic State group extremists. It also disputed how much it actually produced.
Iran has only been able to freely to export oil since last year's nuclear deal came into force in January, and wants to return to pre-sanctions output levels.
The dispute was complicated by the fierce rivalry between Shiite Iran and Sunni Saudi Arabia, backing different sides in the wars in Yemen and Syria.
Fawad Razaqzada, a market analyst at Forex.com, said before OPEC's announcement that Iran was "playing a clever game" against its arch rival.
But Saudi Arabia also played hard-ball, saying it was prepared to leave the Austrian capital without a deal.
Energy Minister Khaled al-Falih had said recovering demand will boost prices next year -- cut or no cut.
Even though expectations were therefore low, failure to get a deal would have sent oil prices tumbling, perhaps as low as $30 per barrel, analysts had said.
Also it would have reignited debate about the very purpose of OPEC, 56 years after its creation.
Focus will now turn to OPEC's efforts to get non-members, in particular Russia, to reduce their output by a hoped-for 600,000 bpd.
Russia has said it is ready only to freeze production but Sada said Wednesday that Russia has committed to reducing its output by 300,000 bpd.
While consumers might not welcome the more expensive fuel that a deal would bring, OPEC members' public finances have been shot to bits by two years of rock-bottom prices.
It has exacerbated an already desperate situation in Venezuela, where Human Rights Watch says shortages of basics are so bad that there is a "profound humanitarian crisis".
Even fabulously wealthy Saudi Arabia has slashed salaries and spending and is on course for a budget deficit of $87 billion in 2016, and owes foreign firms billions in unpaid bills.
The low crude price has also hit investment in oil facilities, raising the prospect of oil shortages further down the line.
However, further downwards pressure on oil prices could come from the United States and president-elect Donald Trump, whose policies could see a renewed rise in US oil production.
Trump has promised to eliminate regulations restricting fracking, support oil and gas pipeline construction and open restricted federal lands and offshore areas for exploration, including Alaska.