The latest wave of terror attacks carried out in Afghanistan by ISIS demonstrates that, for all the recent setbacks it has suffered, the organisation has lost none of its ability to wreak carnage around the world.
ISIS was quick to claim responsibility for the twin bombings in Kabul earlier this week which killed 25 people, including nine reporters, saying that they were directed at Afghanistan's intelligence headquarters.
The atrocity is significant for two reasons. Firstly, in recent months, the majority of terror attacks carried out against the Afghan government have been the work of the Taliban, a rival Islamist terror organisation that is seeking to reassert its influence in the country following the removal of the bulk of Nato forces that have been trying to destroy the organisation since the September 11 attacks.
The other is that the attacks illustrate just how much of a threat ISIS remains, despite the humiliating defeat it has suffered in Iraq and Syria, where its so-called caliphate has been reduced to rubble.
Following the group's defeat at the hands of the US-led coalition at the end of last year, there has been a great deal of discussion about whether ISIS could survive, or whether it would simply disband and disappear.
Its defeat in Iraq and Syria has certainly had a negative impact on the morale of ISIS recruits. Having seen thousands of their co-fighters perish under the coalition’s merciless military assault, many of the survivors have simply decided that jihad is not for them, and returned to their home countries.
At its height, the so-called caliphate was said to comprise an estimated 25,000 foreign fighters originating from more than 100 countries. According to a recent study by the Soufan Centre, an independently-funded NGO that analyses emerging global security threats, at least 5,600 of them have returned home, including 20-30 per cent of fighters who came from Europe. Thousands more have been detained by local opposition groups and government forces working with the coalition.
Analysts believe that there remains a core of adherents to the ISIS creed who have simply melted away with the intention of regrouping, and launching a fresh wave of terror attacks in the future.
Thousands of ISIS-affiliated fighters remain in Iraq and Syria, hiding in isolated desert or mountain retreats, from where they continue to mount terror attacks against security forces and civilians. And coalition commanders believe that ISIS will continue to remain a threat in these countries so long as key figures in ISIS' leadership remain at large, including Abu Bakr Al Baghdadi, the movement’s charismatic leader who established the so-called caliphate in the first place.
Moreover, officials from as far afield as Tunisia and Somalia have recently reported evidence of renewed ISIS activity in their territories. In Tunis, officials say they have uncovered evidence that ISIS is trying to rebuild its network in North Africa and the Maghreb. A similar picture has emerged in Somalia, where the UN Monitoring Group on Eritrea and Somalia recently reported that ISIS had “grown significantly” from a few dozen fanatics in 2016 to 200 fighters today.
And Afghanistan, where the country's security forces are struggling to cope with the continued threat posed by the Taliban, presents a perfect location for ISIS remnants to regroup and mount fresh terror attacks.
A report issued this week by the Special Inspector General for Afghanistan Reconstruction (Sigar) made for depressing reading, reporting that the Afghan security forces had registered a significant decline in their numbers, while the Taliban and other militants groups had increased their control or influence to around 14.5 per cent of Afghanistan's 407 districts – the highest level since the group started recording such data in late 2015.
The lawlessness affecting large chunks of Afghanistan therefore provides fertile territory for ISIS, which has seen its numbers rise significantly in recent months, with coalition officials estimating its strength in Afghanistan at between 3,000 and 5,000 fighters.
Like the Taliban, ISIS is committed to driving the remnants of the 15,000-strong Nato mission out of the country and establishing a harsh form of Islamic rule throughout the country.
ISIS’ arrival in Afghanistan has not gone unchallenged by the Taliban, which resents the introduction of a rival Islamist group that has large numbers of foreign fighters, unlike the Taliban, which is mainly drawn from the indigenous Pashtun community. This has resulted in a number of clashes between the two groups, particularly in Nangarhar province.
The emergence of a rival Islamist terror group to the Taliban is certainly bad news for attempts by Afghan President Ashraf Ghani to revive peace talks with the Taliban leadership. ISIS is opposed to any form of deal and has managed to attract a number of Taliban fighters to its ranks who take the same view.
The increasingly complex and fraught situation that is developing on the ground in Afghanistan is certainly something that the West and its regional allies cannot ignore.
One of the reasons that groups like ISIS came into existence in the first place is the Obama administration’s decision to turn its back on its long-standing commitments to safeguarding the security and well-being of the Middle East.
The result was widespread political instability, particularly in countries like Iraq, where Barack Obama’s abandonment in 2011 was a significant factor in ISIS' creation.
ISIS may have been roundly defeated in Iraq and Syria at the hands of the US-led coalition, but that does not mean the war is over. This time around, the West and its allies must make sure not to repeat the mistakes of the past, and maintain their vigilance to make sure ISIS is never again in a position to re-establish its so-called caliphate.
Con Coughlin is the Daily Telegraph’s defence and foreign affairs editor