The past year has witnessed a dramatic reversal of fortunes for the Islamic State of Iraq and the Levant group, which suffered a stunning series of defeats in its former strongholds.

From Mosul to Hawija in Iraq, and from Raqqa to al-Bab in Syria, ISIL has been driven from key territory, leaving the group's expansive vision of a caliphate in tatters. To date, more than 98 percent of the areas it previously held have been retaken, and more than seven million Syrians and Iraqis have been freed from the group's control, according to the US-led coalition battling ISIL.

Meanwhile, the ISIL fighters who evaded death or capture have "gone to ground" in rural areas between Iraq and Syria in an effort to regroup and replenish, experts note.

"The Islamic State of today organisationally looks profoundly different to the Islamic State of just a few years ago ... No more does it control a contiguous territory, no more does it have control over urban centres, cities or towns," said Charlie Winter, a senior research fellow at the International Centre for the Study of Radicalisation and Political Violence at King's College London.

"Instead, it appears to have gone to ground, returned to its covert insurgent roots. This means that it's more like an archipelago of all the territories that together still form what it considers to be the Islamic State, what it still considers to be a caliphate," Winter told Al Jazeera. "But it is no longer operating or able to operate in the same way that it was in 2014 or 2015 or 2016."

Rise and fall

In January 2014, ISIL, also known as ISIS, took Raqqa as its capital, holding the city until Syrian forces reclaimed it late last year. By June of 2014, ISIL had also taken Iraq's second city, Mosul, and held it until Iraqi forces separately retook the eastern and western halves earlier in 2017.

At its peak, ISIL controlled a vast swath of territory that defied the Syria-Iraq border, maintaining key urban strongholds from Fallujah to Tikrit to Aleppo - gains that have all since been reversed.

Last month, Iraqi Prime Minister Haider al-Abadi declared "the end of the war" against ISIL in his country, announcing that Iraqi forces had secured total control over the Syria-Iraq border. But while battles still remain to be fought in both countries, it is highly unlikely that the group could stage a comeback similar to its meteoric rise four years ago, analysts say.

"That moment was a unique one in terms of the circumstances that gave rise to it: the chaos of the Syrian civil war, free access to the borders with Turkey, streams of foreign fighters coming in, etcetera," Aymenn Jawad Al-Tamimi, a research fellow at the Middle East Forum, told Al Jazeera.

And while some of the conditions that facilitated the group's rise remain in place, ISIL's resources have been significantly depleted in the intervening years.

Although the group has managed to maintain a governance project in certain areas, such as through its affiliate Jaysh Khalid bin al-Waleed in Deraa, the group primarily operates as an "insurgency" today, Tamimi noted.

"It's still a major concern in the border areas where, despite claims by both the Syrian government and the US-backed SDF [Syrian Democratic Forces], the Islamic State still holds some territory in the eastern province of Deir Az Zor and operates relatively freely in the desert borderlands with Iraq," he said.

According to Colonel Thomas Veale, a spokesperson for the US-led international coalition fighting ISIL, work is ongoing to clear fighters from the areas where they remain, including rural parts of Anbar province and the Middle Euphrates River Valley in Syria.

"The remaining ISIS terrorists are cut off from their leadership and from their logistical support. It is only a matter of time until the SDF and coalition eradicate ISIS from every area within our area of operation," Veale told Al Jazeera.

Of the estimated 40,000 ISIL fighters believed to be operating in Syria and Iraq at the group's peak in 2015, it is unclear how many remain alive or active, but Veale noted that 98 percent of the more than 100,000 square kilometres of territory the group once controlled has been recaptured. "As the result of our combined effort, the overwhelming majority of ISIS terrorists have been taken off the battlefield," he said.

Returning fighters

In the meantime, ISIL is continuing to disseminate propaganda - albeit on a more limited scale than in the past - in an effort to assert its continued existence, Winter said. On the group's Telegram channel, photos periodically emerge of fighters hanging out in caves, suggesting they are "biding their time" underground until the group is ready for a resurgence.

"That's essentially what the organisation seems to have called for since the fall of Raqqa," Winter said.

Also problematic is the issue of ISIL fighters who have fled Syria and Iraq and started returning home.

Turkey, a transit point for many foreign fighters en route to join ISIL, could also be their path on the way out, putting the country at further risk. In the final days of the battle for Raqqa, it is unclear how many ISIL fighters were smuggled out through this route - and how many among them were still "committed to the cause", Tamimi said.

Foreign fighters didn't just dry up because ... it got difficult to get into Syria from Turkey. They dried up because it became a less appealing thing to join. Charlie Winter, senior research fellow at the International Centre for the Study of Radicalisation and Political Violence at King's College London

Despite the threat of individual attacks, however, the prospect of a large-scale resurgence of foreign ISIL fighters in another country is unlikely, experts say.

"Foreign fighters didn't just dry up because ... it got difficult to get into Syria from Turkey. They dried up because it became a less appealing thing to join," Winter said. "The Islamic State never had mass appeal, but the appeal that it did have was at its peak in 2014, 2015 and early 2016, when it did look like a successful organisation, when it did look like you could go to join it and not end up having to die in a suicide bomb or after a coalition air strike or something like that. That part of the Islamic State brand no longer exists."

Instead, for the time being, ISIL has been encouraging its supporters to launch localised attacks in their home cities and provinces to keep up a global sense of momentum.

"The inability to quell the Islamic State as an insurgency problem, even if it fails to regain formal control of territories it lost, [remains] a concern, as in Diyala, and likely the issue will become notable in Nineveh too," Tamimi said.

Lingering effects

Meanwhile, residents of the areas once controlled by ISIL have been struggling to rebuild their lives. Parents whose young children were trapped under ISIL's rule must grapple with the lingering effects of indoctrination or years of missed education. Experts say the full scale of the problem is unknown, as there has been no opportunity yet for an exhaustive assessment.

"There might actually be a lost generation," Nadim Houry, the director of the terrorism and counterterrorism programme at Human Rights Watch, told Al Jazeera.

From the trail of unexploded ordnance left by ISIL, to the razing of entire neighbourhoods in battle, to the lack of basic services such as water and electricity, to the stigmatisation of women who suffered sexual violence under ISIL's rule, families face myriad challenges in their quest to move on.

"There is a real crisis today ... of sort of what is the broader strategy, the broader plan," Houry said, noting that many people "are just still trying to comprehend what happened".

"There are a lot of energetic, well-intentioned people working locally [to rebuild]," he said. "I think what is missing, is there is a lack of international support and international vision for the day after ISIS. All the energy of the international coalition has been focused on the war effort, and a lot of resources were put into it, but actually very little resources, very little thought, were provided for the day after."

Follow Megan O'Toole on Twitter: @megan_otoole