ISIS may be losing ground, but that doesn't mean it's gone As ISIS adapts to losing territory, its strategy will shift.

 -- Just as the U.S. military and its coalition partners have seen success in the ground fight against ISIS in its so-called caliphate, ISIS has claimed responsibility for dozens of terrorist attacks abroad this year, killing hundreds of people. As ISIS fighters flee territory they have lost in Iraq and Syria, counterterrorism experts and officials say, the next phase of ISIS-bred terrorism has begun.

Just this week, a massacre at a mosque in Egypt killed more than 300 people, and eyewitnesses reported seeing dozens of attackers carrying the notorious ISIS flags at the scene. Earlier in November, ISIS-inspired suspect Sayfullo Saipov drove a truck onto a busy pedestrian and bike path on New York’s West Side Highway, killing eight people. And with the holidays approaching, ISIS propaganda sites have recently threatened to attack Christmas markets in the U.K. and France, after an attack at a Berlin Christmas market last year.

These types of attacks are unlikely to come to an end soon. “While the ISIS presence in the physical world may becoming more decentralized and diffuse, their presence in the digital world is still robust, influencing disaffected people in Europe and the U.S. to take up their cause,” said John Cohen, a former Department of Homeland Security counterterrorism coordinator who is now an ABC News consultant

As ISIS adapts to losing territory, experts say, we can expect to see strategy shifts in these three key areas:

ISIS in the caliphate

With the fall of Raqqa in Syria, ISIS’ de facto capital, the terrorist group has been denied its so-called caliphate or state. The Syrian Democratic Forces, an alliance of Kurdish and Arab militias backed by the U.S., proclaimed victory on Oct. 20, marking liberation for the city, which had been under ISIS rule since 2014. ISIS’ Iraqi capital, Mosul, fell in July. Though fighting continues in some pockets, these major victories spell the end of the conventional ground war against ISIS, according to defense officials.

However, given the six-year civil war raging in Syria, the status quo may not last for long. Multiple parties are vying for dominance in the region, including Syrian President Bashar al-Assad’s Russian-backed forces and the Kurds in northern Syria.

Given all the upheaval, an ISIS resurgence or the emergence of a successor organization is not an impossibility. The Syrian Observatory for Human Rights recorded ISIS retaking a town from Syrian regime forces in Homs province, for example.

In addition, ISIS fighters, many of them foreign fighters who were attracted to the caliphate from across the globe, attempted to escape the battle.

Though the U.S.-led coalition fighting ISIS recommended that no ISIS fighters be allowed to leave Raqqa in the final days of the battle, coalition spokesman Col. Ryan Dillon recently told reporters that he cannot say “with a 100 percent certainty that every single fighter was identified coming out of Raqqa.”

An agreement to evacuate civilians from Raqqa to prevent civilian casualties in the final days of the fight could have presented an opportunity for some ISIS fighters to escape the city. Though the Syrian Democratic Forces set up a screening process for all males of ISIS fighting age, Dillon admitted that some fighters possibly fell through the cracks of that screening process.

ISIS in the US and the West

If foreign fighters did escape Raqqa, they could look to return to their homes. Counterterrorism experts say many foreign fighters went to Iraq and Syria from Europe, which remains vulnerable to attacks like those in Manchester, England; Nice, France; and Paris.

“Many European Muslims integrate poorly into their broader communities, which discourages them from cooperating with intelligence and law enforcement services,” said Daniel Byman, a senior fellow at the Center for Middle East Policy at the Brookings Institution, in testimony before Congress this year. Furthermore, intelligence capabilities across European nations vary. While those of some, like the United Kingdom and France, are strong, those of others, like Belgium, are underfunded and underdeveloped.

Although the United States has seemed less vulnerable to attacks because of its distance from the conflict and security efforts at home, according to Byman, some experts say some of the Trump administration’s policies could alienate Muslim Americans from cooperating with the intelligence community and police.

Actions like Executive Order 13769, commonly referred to as the Muslim ban, “increase the allure of the Islamic State and other groups that claim that the West is at war with Islam,” Byman said.

Cohen warned that efforts to counter social media propaganda have often failed in the United States. “We have found that those who have carried out attacks in the name of ISIS have done so because of their own psychological conditions, rather than their adoption of the narrative,” he explained. Mental health professionals have worked with the Department of Homeland Security to identify psychologically vulnerable populations and address underlying issues and causes.

New hubs for ISIS

Foreign fighters who don’t return to the United States or Europe might look for areas with little to no governance or porous borders for an opportunity to regroup and resurge.

Countries in central and southern Africa in particular offer safe havens because of the lack of U.S. counterterrorism presence there. Just last month, an ISIS affiliate ambushed a team of soldiers in Niger, killing four.

Libya, Yemen, Somalia and Egypt all offer attractive possibilities, given the lack of strong governance in those countries.

“What we saw in Niger and what we saw in Egypt is a harbinger of things to come — more aggressive attacks by regional extremist groups because their ranks have been filled by hardened, fully formed fighters fleeing from Iraq and Syria,” said Cohen.