Royal Dutch Shell (RDS.B - Get Report) plans to withdraw from its last two flagship oil fields in Iraq, officially exiting the country after a century in the Middle Eastern country. 

Iraq is a member of OPEC and sits on some of the world's largest oil reserves, but contracts in the region have become increasingly lower margin. The company said that it agreed to relinquish operations at the Majnoon field after unfavorable changes to fiscal terms. 

"Following extensive discussions with the Ministry of Oil, His Excellency the Oil Minister of Iraq formally endorsed a recent Shell proposal to pursue an amicable and mutually acceptable release of the Shell interest in Majnoon, with the timeline to be agreed in due course. Shell remains otherwise firmly committed to Iraq," Shell said in a statement. 

Shell is also selling its 20% stake in West Qurma 1 oil field, which is jointly operated by Exxon Mobil (XOM - Get Report) . 

Shell produced nearly 20 million barrels of oil in Iraq last year, accounting for about 3.5% of its overall output last year. 

Shell stock traded up 0.24% to $58.75 midday Wednesday.

More of What's Trending on TheStreet: