Global oil prices soared by almost 9% to the $50-a-barrel range Wednesday, after OPEC agreed to its first limit on production since 2008.

OPEC agreed to cut output by 1.2 million barrels a day to cap production at 32.5 million barrels a day, effective Jan. 1, 2017, according to OPEC President Mohammed Bin Saleh Al-Sada. The duration of the agreement is six months, but can be extended for another six months to "take into account prevailing market conditions and prospects," OPEC said in a statement.

The cartel has "made great success," Al-Sada said at the 171st Meeting of the OPEC Conference in Vienna. "The market needs to be re-balanced; re-balancing the market needed courageous decisions from OPEC along with the support of some key [non-OPEC] countries."

Brent crude, the global benchmark, surged 8.8% higher to $50.47 a barrel, while West Texas Intermediate crude futures gained approximately 8.6% to $49.12. Earlier in the trading session WTI's gains were more than 9%.

In addition to the 1.2 million barrel-a-day cut, the agreement is also subject to a 600,000 barrel-a-day reduction from key non-OPEC producers, Al-Sada said, citing Russia's commitment to cutting production by 300,000 barrels a day. Al-Sada said other countries have pledged their commitment to this cut. There will be a meeting to finalize this element of the agreement.

OPEC's leading producer, Saudi Arabia, will impose the biggest cut, around 486,000 barrels a day. The cartel's No. 2 producer, Iraq, unexpectedly agreed to reduce production by 210,000 barrels per day, after claiming it should be exempt as its needs oil revenues to fund its war against ISIS militants. Meanwhile, Iran was allowed to slightly increase production from its October levels to near pre-sanction production levels. 

OPEC member nation Indonesia will not be participating in the reductions as it is a net importer, Al-Sada said. The nation has decided to suspend its OPEC membership, the second time since joining the cartel. In January 2009, Indonesia suspended its membership but was reactivated in January 2016. Libya and Nigeria were also exempt from cuts due to civil unrest.

The following chart was supplied by OPEC. The organization did not offer an explanation of why some of the numbers don't addup.

Image placeholder title

While some traders were hesitant about any agreement getting done, Daniel Dicker, president of wealth management firm MercBloc and a Real Money contributor, expected OPEC's leading producer, Saudi Arabia, to get a deal completed.

The Saudis deserve credit for imposing the biggest cut and getting a "very significant concession" on production levels from Iraq, Dicker said in a phone interview Wednesday. He believes that oil prices will move to the mid-$50 range, if the deal can be implemented.

The implementation of the cuts is critical to this deal.

"The OPEC decision is especially notable because it shows that they are capable of actually making a deal," wroteReal Money contributor James "RevShark" DePorre. "Wide-spread cheating is anticipated, but there is at least a hint at some discipline when it comes to controlling oil output."

Even though the production cut will send prices higher, Stephens analyst Matthew Marietta said the markets will take more time to re-balance.

"While we are encouraged that OPEC is recognizing it cannot continue to grow output like it has over the past 2 years, we reiterate our view that structurally oversupplied crude markets will take more time to balance," Marietta wrote in a research note Wednesday. He also sees prices in the mid-$50 range.

While that market appears to be bullish on the OPEC production cut agreement, the real winners of the deal may be U.S. producers.

"We see a potentially immediate positive impact on the outlook for U.S. onshore drilling and completion activity should the oil price move above the $50 a barrel level expected by our commodities team in the wake of the OPEC deal," Bank of America Merrill Lynch analysts wrote in a research note Wednesday. 

"While OPEC takes on the role of stabilizing market forces (i.e. addressing the global glut), this frees up U.S. energy companies to increase output and benefit from higher prices without contributing too much toward downward pressure on crude prices," Action Alerts PLUS portfolio co-managers Jim Cramer and Jack Mohr wrote in a recent note to subscribers. 

U.S. integrated oil majors, such as ExxonMobil (XOM) - Get Report , Chevron (CVX) - Get Report and ConocoPhillips (COP) - Get Report , were all gaining Wednesday. Action Alerts PLUS holdings Schlumberger (SLB) - Get Report and Occidental Petroleum (OXY) - Get Report were also up during the trading session. 

Employees of TheStreet are restricted from trading individual securities.

Action Alerts PLUS, which Cramer co-manages as a charitable trust, is long OXY and SLB stock.