It would be perilously naive to ignore the renewed potential for terrorist attacks in Europe

While the Taliban’s takeover of Afghanistan is primarily a societal, security and economic disaster for Afghanistan, it also creates a climate of extreme danger for the West. The attack on Kabul at the end of August has starkly underscored the growing terrorist threat in Afghanistan, which will undoubtedly seep into neighbouring countries and beyond. UK intelligence and security services must act now to protect British citizens from a renewal of the same terrorist threat which led to 9/11 and the rise of Isis.

It has been well known for some time that key Taliban powerbrokers, such as the leaders of the Haqqani network, remain intimately connected to international jihadist terror groups. A militant Islamist movement dedicated to establishing an Islamic state in Afghanistan and Pakistan, the Haqqani network has, in recent years, significantly embedded itself with Al-Qaeda and is now widely regarded as a leading insurgency force in South Asia.

For the Haqqani network to be put in charge of Kabul’s security amounts to giving a fox the run of the chicken coop. It is delusional to think that, despite what the Taliban are saying, the Haqqani network is willing to prevent Al-Qaeda from once again using Afghanistan as a base from which to coordinate attacks against the West.

Another equally dangerous jihadist threat, rising inexorably out of the chaos sewn by Kabul’s seizure, will prove entirely beyond the Taliban’s ability to control. The Islamic State-Khorasan Province, commonly referred to as Isis-K, IS-K or Iskp, was founded in 2015, when Isis leaders sought to expand their influence beyond the borders of Iraq and Syria. The group grew quickly, orchestrating regular attacks throughout Afghanistan and recruiting directly from the Taliban’s ranks those most dissatisfied by their unwillingness to fight western forces more aggressively.

The Iskp has long desired to do battle with the West directly but, until now, has lacked the capacity to mount an international attack. With many of its members having been freed from prison upon the withdrawal of our military forces, the group is rapidly returning to full strength, and is considered a dire and imminent threat to the safety of UK citizens and those Afghans who have stood alongside our forces who have yet to be evacuated from Afghanistan. Iskp has taken responsibility for Kabul’s bombings. Already, the Taliban has proven itself completely incapable of containing them.

Beyond the borders of Afghanistan in the emerging Afghan refugee crisis, both the Haqqani network and Iskp will see the perfect opportunity to carry out attacks in major western cities before the end of the year.

The UK has committed to taking in 20,000 Afghan refugees. While this is without question a moral duty that we must fulfil, integrating and settling such a large number of people, in a safe and orderly fashion, will be a monumental and dangerous logistical task that we have to be prepared for. To ignore the potential for terrorist attacks would demonstrate perilous naivety about the way in which events over the past two weeks are being interpreted by jihadists globally.

What in western eyes simply appears to be an embarrassing retreat is, for those committed to the cause of perpetual global jihad, a glorious defeat of the West, a divine validation of their life’s work and a call to go further than ever before. It is therefore irrational and reckless to imagine a softer, moderate Taliban, or for an Isis humbled by their hard-fought defeats to western forces over the past decade.

After the fall of Kabul, every jihadist group with whom the West has battled over the past 20 years will take heart and inspiration from the West’s retreat and inevitably pursue their jihadist agenda more aggressively and actively. Not just in Western cities but in South East Asia and Africa. Boko Haram in Nigeria will have cheered the Taliban victory to the rafters.

In the coming weeks and months, our intelligence and counterterrorism agencies must therefore prepare for a terrorist threat more serious than any this country has faced since Isis and Al-Qaeda were at their respective heights of power.

While increased emergency funds must be diverted towards these services in order to ensure they can scale up to the increased threat in a timely fashion, we need to ensure that those already inside the country who have been flagged as having connections to any members or associates of the Haqqani network or Iskp are monitored more closely. A very labour intensive task. Later, as we begin to integrate our share of Afghan refugees into British society, it will also be important to bolster efforts at deradicalisation, through programs like Prevent.

Crucially, this is not a threat that can be avoided without international cooperation. Cross border counter-terror coordination such as we practised with the rest of Europe in the years following the 7/7 London bombings will be essential. This will undoubtedly be more difficult, in the current post-Brexit political climate, but ensuring it remains effectively in place will save lives.

Our task has not been made easier by the precipitate withdrawal from Afghanistan and by the chaotic and tragic scenario unfolding at Kabul airport. But by preemptive measures today, we may yet minimise the worst consequences of the decision.

Sir Ivor Roberts is a senior advisor for the Counter Extremism Project (CEP), an international non-profit organisation working to combat the growing threat of terrorism and extremist ideology