BAGHDAD — 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.

While Abadi has expressed confidence that the government can overcome the crisis, 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.

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 $550 million for reconstruction.