The motive according to the Organization of the Petroleum Exporting Countries is aimed at reducing a global glut that has kept prices painfully low.
The cartel it said 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. He also said that the deal will help global inflation accelerate to a "more healthy rate", including in the United States.
According to an OPEC statement, Saudi Arabia will reduce output by 486,000 bpd from October levels to 10.1 million bpd. Iraq will cut by 210,000 bpd to 4.4 million bpd and UAE 139,000 to 2.9 million bpd.
Negotiations almost failed after OPEC's three biggest producers, Saudi Arabia, Iraq and Iran, deliberated who would do the heavy lifting.
Iraq had said it was short of money to fight Islamic State group extremists, while Iran wants to hike output to levels before it was hit by Western sanctions over its now- reduced nuclear programme.
Iran will actually increase production by 90,000 bpd to 3.8 million bpd under the deal. Oil Minister Bijan Namdar Zanganeh flashed a victory sign to reporters as he left OPEC headquarters.
Libya and Nigeria are exempted, while Indonesia has suspended its membership.