These trends, described by Iraqi, American and other Western intelligence and military officials, and documented in a recent series of government and United Nations assessments, portray an Islamic State on the rise again, not only in Iraq and Syria, but in branches from West Africa to Sinai. This resurgence poses threats to American interests and allies, as the Trump administration draws down American troops in Syria and shifts its focus in the Middle East to a looming confrontation with Iran.

“However weakened ISIS may now be, they are still a truly global movement, and we are globally vulnerable,” Suzanne Raine, a former head of Britain’s Joint Terrorism Analysis Center, said in an interview this month with West Point’s Combating Terrorism Center. “Nothing should surprise us about what happens next.”

One significant indicator that points to the Islamic State’s resurgence is the amount of ordnance dropped by American aircraft in Iraq and Syria in recent months. In June, American warplanes dropped 135 bombs and missiles, more than double what they had in May, according to Air Force data.

Defense officials in the region say the Islamic State is now entrenched in mostly rural territory, fighting in small elements of roughly a dozen fighters and taking advantage of the porous border between Iraq and Syria, along with the informal border between Iraqi Kurdistan and the rest of the country, where security forces are spread thin and responsibilities for public safety are sometimes disputed.

For Iraqis in northern and western provinces where the Islamic State was active in the past, the sense of threat never disappeared, as the attacks slowed but never halted. In just the first six months of this year, there were 139 attacks in those provinces — Nineveh, Salahuddin, Kirkuk, Diyala and Anbar — and 274 people were killed. The majority of the dead were civilians but also included Iraqi security forces and popular mobilization forces, according to reports by Iraqi security forces and civilians gathered by The New York Times.

A particularly brutal episode of the kind not seen since the Islamic State was in control of territory in northern Iraq occurred in early August when armed men claiming ISIS allegiance held a public beheading of a policeman in a rural village south of the city of Samarra in Salahuddin Province, about two hours north of Baghdad.