Counterterrorism specialists said the new study illuminates a trend that has been emerging for several months, as American-backed ground forces in Iraq and Syria have steadily rolled back territorial gains the Islamic State achieved in 2014 and used as the basis for its global appeal to Muslims to come join the caliphate. Now, its strongholds of Mosul, Iraq, and Raqqa, Syria, its self-declared capital, are besieged, and senior leaders have fled as opposing forces close in.

“ISIS has anticipated the loss of its government for over a year,” said William McCants, a senior fellow at the Brookings Institution and the author of “The ISIS Apocalypse: The History, Strategy and Doomsday Vision of the Islamic State.” “They are prepared to wage a war from the shadows to reclaim it.”

The report’s authors, Daniel Milton and Muhammad al-Ubaydi, say their findings aim to draw a more accurate picture of the military challenges in Iraq and Syria, especially in maintaining security in cities large and small that have been reclaimed from the Islamic State.

“Despite all of these positive connotations, the liberation of cities in Iraq and Syria has proved to be much more of a mixed bag for those living in the aftermath,” the report said. “Part of this is the challenge of governing post-liberation areas where city infrastructure has been destroyed and where security threats still remain.”

The report cites the example of Falluja, which was freed by Iraqi forces in June 2016.

Many months later, news media reports suggest that residents still face an array of challenges, such as destroyed buildings, live Islamic State munitions buried in the rubble and the continuing threat of Islamic State attacks, the report said.