In December, Iraq exported about 91.1 million barrels of oil, its highest level in any month since 1980. But that crude bonanza isn't the windfall that the government of the world's eighth-largest oil producer might have expected. Iraq has managed to ramp up production to levels not seen since before the war with Iran 35 years ago, but the plunging price of oil is hurting the country. With oil at $50 a barrel, it's nearly impossible to eradicate the Islamic State group from the country or provide basic social services.

The oil price fall is also straining the deal signed just a few weeks ago between the Kurdish regional government and Baghdad, in which the Kurds, who have been running what amounts to a near-independent state for years, would get a share of Iraqi government revenue if they don't sell their oil on the market bypassing Baghdad. 

“There is a serious financial strain not just on Baghdad and the Kurds but across the country, and it is going to require across-the-board cuts,” Denise Natali, a senior research fellow at the National Defense University in Washington, said.

Those cuts would be a heavy hit for Iraqis. About 23 percent of the population lives on about $2 a day and 11 percent of the population is unemployed, according to U.N. statistics. Tens of thousands of people displaced by the war in Iraq have been deprived of medical care, and humanitarian organizations there are struggling to provide for the ever-growing number of displaced people.

The economy is expected to grow steadily in 2015, but that nominal growth won't translate to more money in the Iraqi state coffers. According to the U.N., 99 percent of Iraq’s government revenue is generated by the oil sector. The price of a barrel of crude dropped from $100 in mid-2014 to below $50 this week, a five-year low. In November, the Iraqi oil ministry said Baghdad lost more than 27 percent of its projected revenues for 2014 because of the fall in prices.

The government of Iraqi Prime Minister Haider al-Abadi approved the budget for 2015 on Dec. 23, which was $100 billion and included a $20 billion deficit. But that deficit is in reality much more. Baghdad budgeted using a global oil price of around $60 a barrel. With oil prices now much lower than that, Iraq is in more financial trouble than it originally estimated.

The low price is fueling tensions between the Kurdistan Regional Government, the central government in Iraq, and the oil-rich region of Basra, the largest city in the south of Iraq. Each region is vying for more control over oil production and revenue. The infighting and fractionalization is hindering the effort to contain and repel the Islamic State group, also known as ISIS or ISIL.

The Kurds, whose military has been fighting ISIS since June, for the past six months has been exporting oil via a pipeline that runs through Turkey to the Mediterranean port of Ceyhan, without the consent of the Baghdad government, which was required by law. According to the Iraqi Oil Report, the three provinces of the Kurdistan Regional Government were producing about 120,000 barrels a day from two fields in the Kirkuk region. Dozens of tankers picked up some of that oil in Ceyhan. About 34.5 million barrels of illegally exported Kurdish oil were offloaded in Ceyhan. 

Baghdad and the semiautonomous Kurdish region settled their long-running oil dispute last month, in a deal that means Baghdad will receive the revenue from oil sales but also resume payments to the Kurdistan Regional Government. Experts say the Kurds didn't have any other choice but to cut a deal as they have a large influx of refugees to handle. And with its military fighting some of the fiercest battles in Iraq, Kurdistan was running out of cash, and many international buyers wary of legal consequences stayed away from its oil. 

“The conflating oil prices along with everything else … minimizes the flexibility of both [Baghdad and the Kurds],” Natali said. “Had the oil prices dropped and the Kurds had an alternative revenue base outside of oil, then they might have different alternatives.”

Under the new deal, Iraqi Kurdistan is required to export 550,000 barrels of oil per day through Iraq's national oil company. In exchange, the Kurds will receive a 17 percent share of the national budget, which Baghdad had cut off during the dispute.

It's unclear from the initial details of the deal if, and how, the revenue generated from the oil exports would be split between Baghdad and Iraqi Kurdistan. The Kurds will also receive an additional $1 billion in installments to help the peshmerga, the Kurdish army, fight ISIS.

According to Natali, Baghdad has also promised to pay $500 million for Kurdish government employee salaries, but it might not have the funds to pay. So far, the Kurds haven't received any installments from the central government.

“Part of the Kurdish oil money has not been paid yet by the Kurdish authorities. They say they need to take the money from the contracting parties to make the payment to us,” the Kurdish minister of natural resources said at a recent conference on Kurdish oil and gas in London.

"Baghdad can’t pull money out of the air,” said Luay al-Khatteeb, the senior adviser to the Iraqi parliament for energy policy and economic reform, adding that using today's oil prices as an average for 2015, the Kurds will get more revenue out of the federal budget than if they were to operate independently from Baghdad. In fact, without a deal with Baghdad, al-Khatteeb said, the KRG would lose out on $4 billion. (Under the terms of the recently approved budget, the Kurdish share of the government budget amounts to $17 billion a year; with oil at $50 a barrel, Kurdish exports are worth significantly less, about $10 billion a year -- an even worse proposition.) 

Over the past 10 years, Natali said, "the Kurds raised people’s expectations of what they should have ... and what the Kurdish region should provide. This could be a moment of opportunity for the Kurds to implement their own austerity measures," she said.

Meanwhile, leaders in the oil-rich southern province of Basra are lobbying the central government to give them a bigger cut of the federal budget. Since 2003, al-Khatteeb said Basra has received only 1.7 percent of the federal budget per year even though it has a population just below that of Iraqi Kurdistan and it contributes to 90 percent of Iraq's oil production. With a dwindling economy, leaders in Basra are now making a renewed push to form a regional government similar to Iraqi Kurdistan. 

The three regions are fighting over provisions in the new budget, which is in turn causing deep political rifts. That's happening against the background of an armed group that has seized large swaths of Iraq and is now providing people in its so-called "caliphate" lucrative jobs as well as social services.

Although the U.S.-led coalition's airstrikes are cutting heavily into the group’s profits, which at one point were, on average, between $2 million and $3 million a day, ISIS is still able to provide food to the people living in Mosul, which it took over in June, and salaries to its soldiers.

"ISIS is losing ground in Iraq and losing control of lucrative assets," al-Khatteeb said. "But ISIS financial support will continue with foreign donations." And until the Islamic State group is able to appear to many Iraqis as a credible alternative to the central government, it will continue to exert a pull that an increasingly poor Baghdad can't afford to counter.