An Iraqi national flag flies in front of excess gas as its being burnt off in the newly opened section of an oil refinery in the Zubair oil field southwest of Basra in southern Iraq on March 3, 2016. (Haidar Mohammed Ali/AFP/Getty Images)

Some Iraqi officials refer to it as “the gap,” and it is becoming as pressing a concern as the fight against the Islamic State.

Each month, Iraq’s government pays out nearly $4 billion in salaries and pensions to the military and a bloated array of public-sector workers. But with more than 90 percent of government revenue coming from oil, it is bringing in only about half that as crude prices plunge.

The United States is stepping in to try to make sure the country can continue military spending while it seeks international loans and embarks on an austerity plan. Still, some Iraqi officials and analysts say the government might struggle later this year to pay the 7 million people on the public payroll, which could trigger mass unrest.

With oil prices hovering around $30 a barrel, the entire region is being forced to cut budgets, reduce state handouts and make other painful adjustments. But for Iraq, the decline comes in the midst of an already destabilizing war. There are bills for reconstructing flattened cities and assistance for 3.3 million Iraqis who have been internally displaced over the past two years, with more expected to come.

With the state facing the prospect of bankruptcy, Prime Minister Haider al-Abadi is trying to address corruption and boost government income in sometimes unpopular ways.

“We have to fill the gap,” said Mudher Salih, an economic adviser to the prime minister. “It’s really severe now, the cash flow is very low and the old cash cow has no milk.”

In recent weeks, Shiite cleric Moqtada al-Sadr has mobilized tens of thousands of protesters in central Baghdad to demand reform, putting pressure on Abadi.

It echoes protests in the summer, when thousands of Iraqis took to the streets to protest government corruption and a lack of electricity and other services. This year, they are being asked to pay more for those services, while government salaries have been trimmed 3 percent.

“Now the corrupted government is asking the people for austerity, and because of it the fate of trillions is unknown,” Sadr told the crowds on Friday, adding that the demonstrations were an effort to “save Iraq from thieves.”

Iraqis are facing more nominal charges every day. Hospitals, which have long treated Iraqis free of charge, have introduced nominal fees, even for those visiting sick relatives. There are plans for increased electricity charges. In the southern city of Basra, traders have protested new customs charges.

“In a time of war, not the kind of thing you want to be doing,” Sajad Jiyad, a research fellow at the Baghdad-based Iraqi Institute for Economic Reform, said of increased charges. “It’s not great for morale.”

But Abadi says the government has to make money where it can. Iraq has predicted a budget deficit of about $25 billion this year, but that was based on an oil price of $45 a barrel. The shortfall could be double that, Salih said.

To cope in the short term, Iraq is dipping into its foreign reserves, saying it expects them to fall to about $43 billion this year from $59 billion in October.

Abadi has expressed confidence that the government can overcome the crisis, but some are more pessimistic.

“They are burning through their reserves faster than anticipated now, which could lead to a point where it would be difficult to continue imports and run a modern state economy,” a Western official said, speaking on the condition of anonymity because he was not authorized to comment publicly about the issue.

Iraq is seeking more financing from the International Monetary Fund after receiving a $1.24 billion emergency loan last year. The United States is offering a $2.7 billion loan for military spending, and Germany has lent the country just over 500 million euros ($550 million) for reconstruction.

The government is also trying to issue bonds and treasury bills. But a bond issue last year was halted because of the high yields demanded by investors.

Meanwhile, Iraqis complain that their leaders steal from the country with impunity.

Mishaan Jabouri, a member of parliament’s integrity committee, which is tasked with monitoring corruption, caused a stir last month when he admitted that he took millions of dollars in bribes.

“Each one of us has a role in the corruption,” he told al-Etijah television.

“Did you take a bribe?” the interviewer asked. “I swear on my honor I did,” he replied, adding that at least he continued his investigative work.

Abadi is trying to move against the graft. Four Iraqi officials were referred to court on corruption charges last month, but with powerful figures set to lose out and graft present at every level of government, the challenge is huge.

“It’s not easy to change 12 years of waste and corruption overnight,” Salih said about the prime minister. “He’s trying.”

Jiyad said he thinks the government can “scrape” through the year but will face extreme difficulties if oil prices remain depressed in 2017.

“If it can’t make payroll, there will be strikes and a breakdown in law and order,” he said.

Abadi has said some positive changes will come with the crisis — a chance to make long-needed economic reforms and diversify the economy.

Industry was hobbled by years of international sanctions against Saddam Hussein, while many of the country’s factories were stripped bare in widespread looting during the 2003 U.S.-led invasion. With the country having little in the way of a private sector, Iraqis have become accustomed to state jobs, with workers productive for an average of only about 15 minutes a day, Salih said.

“Everybody in Iraq seeks a free lunch, bed and breakfast,” he said.

In an attempt to diversify in recent months, some of Iraq’s old factories have begun to reopen to manufacture cigarettes, soft drinks and leather goods.

But even these new efforts are being complicated by political squabbling, accusations over corruption and the quality of goods.

At Sadr’s demonstration in Baghdad last week, Abdullah Zubaidi, 34, stood among a sea of Iraqi flags as tens of thousands chanted for reform. He said many people of his generation have little hope for employment. Demonstrators are on the edge, he said.

“This is a rich country,” he said. “And it’s the poor that are being asked to take the burden for the mistakes of the corrupt government.”

Read more:

Today's coverage from Post correspondents around the world