ARTICLE AD BOX
By Frank Gardner
BBC security correspondent
In remote, pine-clad valleys of Afghanistan's Kunar province and in online jihadist chat forums there is jubilation at what al-Qaeda supporters see as "a historic victory" by the Taliban.
The humiliating departure of the very forces that temporarily expelled both the Taliban and al-Qaeda 20 years ago has come as a massive morale boost to anti-Western jihadists all over the world.
The potential hiding places for them now opening up in the country's ungoverned spaces are a tempting prize, especially for Islamic State (IS) group militants looking to find a new base after the defeat of their self-declared caliphate in Iraq and Syria.
Western generals and politicians are warning that the return of al-Qaeda to Afghanistan, in strength, is "inevitable".
UK Prime Minister Boris Johnson, speaking after an emergency crisis meeting, warned that Western nations needed to unite to prevent Afghanistan lapsing back into becoming a haven for international terrorist groups.
And on Monday UN Secretary-General Antonio Guterres called on the UN Security Council to "use all tools at its disposal to suppress the global terrorist threat in Afghanistan".
But does a Taliban return automatically translate into a return of al-Qaeda's bases and a subsequent platform for transnational terror attacks targeting Western countries, amongst others?
Quest for legitimacy and recognition
The last time the Taliban governed the whole country, from 1996-2001, Afghanistan was practically a pariah state.
Only three countries, Saudi Arabia, Pakistan and the United Arab Emirates, recognised their legitimacy.
As well as brutalising their own population, the Taliban provided safe sanctuary for Osama Bin Laden's al-Qaeda organisation which orchestrated the 9/11 attacks on the US in 2001, killing nearly 3,000 people.
An estimated 20,000 recruits from all over the world passed through al-Qaeda's training camps, learning lethal skills and creating what became known as "a university of terror" as they dispersed back to their own countries.
Today the Taliban still see themselves as the rightful - if unelected - rulers of "the Islamic Emirate of Afghanistan" and they will want some degree of international recognition.
They already appear keen to project the idea that they have come to restore order, calm and authority, after the corruption, infighting and waste that has characterised much of government over the last 20 years.
During the failed peace talks that took place in Doha, it was made clear to Taliban negotiators that this desired recognition could only come if they disassociated themselves completely from al-Qaeda.
We have done already, said the Taliban. No they haven't, says a recent UN report which pointed out the close tribal and marital links between the two groups.
During the Taliban's recent dramatic takeover of the whole country, there have been numerous reported sightings of "foreigners" in their ranks, ie non-Afghan fighters.
It's also clear that there is a disconnect between the more moderate, pragmatic words spoken by the Taliban's front men - the negotiators and the spokesmen on the one hand - and some of the barbarous acts of revenge taking place on the ground.
On 12 August, as the Taliban were still advancing on the capital, the US charge d'affaires in Kabul tweeted: "The Taliban's statements in Doha do not resemble their actions in Badakhshan, Ghazni, Helmand & Kandahar. Attempts to monopolise power through violence, fear and war will only lead to international isolation."
West may struggle to contain jihadists
The Taliban's focus is on ruling Afghanistan according to their strict interpretation of Sharia, Islamic law, and not beyond its borders.
But other jihadists in al-Qaeda and IS may have different ambitions beyond those borders. It is quite possible that while the new Taliban government may even want to restrain them, there are pockets of the country where their activities could go unnoticed.
Dr Sajjan Gohel from the Asia Pacific Foundation is expecting that the current 200-500 al-Qaeda members currently thought to be in Kunar will increase.
"The Taliban capture of Kunar province is of enormous strategic value as it has some of the most challenging terrain with densely forested valleys. Already, al-Qaeda has a presence there which it will seek to expand."
If that happens, then it will clearly be far harder for the West to contain it.
For the last 20 years it has relied heavily on the NDS, the Afghan intelligence service, with its network of human informants combined with quick reaction teams of US, UK and Afghan Special Forces.
All that has now gone, making Afghanistan a "hard target" in intelligence terms.
If terror training camps are identified and located, then the options for Washington may well come down to distant stand-off drone strikes or cruise missile attacks, like the ones that missed Osama Bin Laden in 1998.
Much, says Dr Gohel, will depend on whether the Pakistani authorities either deter or enable the travel of foreign fighters through their territory to Afghanistan.