CAIRO -- Given the historic relationship between al-Qaeda and the Taliban, there is a high risk that al-Qaeda will attempt to regain strength in Afghanistan after the Taliban's takeover, analysts warn.
In a statement last month, issued after the Taliban seized power in Kabul, al-Qaeda in the Arabian Peninsula (AQAP) congratulated the group and praised it for its "victory and empowerment".
The Taliban has shied away from commenting on its long-time ally, attempting instead to conceal the relationship in an effort to secure international acceptance and convince the world it has separated from terrorist movements.
But the Taliban–al-Qaeda ties run deep and will be hard to break, said Cairo-based military expert Yahya Muhammad Ali.
"The relationship between the Taliban and most radical groups is one that is built on solid foundations that does not expire with the passage of time," he said, noting that al-Qaeda in particular always received support from the Taliban.
Safe haven for extremists
Between 1996 and 2001, Ali said, the Taliban "established numerous bases and hideouts in different parts of Afghanistan, and Osama bin Laden took refuge in the country for a period spanning more than five years".
"Some disagreements arose at various stages, but they never affected the essence of their relationship and co-ordination, as they only related to the political handling of those stages," Ali said.
As a sign of the strength of the relationship, he said, al-Qaeda chief Ayman al-Zawahiri in 2016 pledged allegiance to Taliban leader Mullah Haibatullah Akhundzada.
This could be the reason for the successive statements of congratulation offered by al-Qaeda and other extremist groups to the Taliban for seizing power in Afghanistan.
Al-Qaeda and other extremist groups are splintered and scattered after suffering defeats in Iraq, Syria and other areas where they had a presence, Ali said.
But with the Taliban in power, he said, such groups "will undoubtedly find a safe haven in Afghanistan to reposition, regroup, plan and organise their ranks... under the Taliban movement's umbrella".
This raises "the probability of a wave of terrorist attacks potentially striking more than one region of the world", he said.
International intelligence agencies have expressed concern over the next stage in the Taliban's rule, now that the group has formed a government, indicating they do not trust the movement to dissociate itself from al-Qaeda.
Pledges of allegiance
The framework for al-Qaeda and all the groups that branched out from it was formed in Afghanistan, said Sheikh Nabil Naim, a founding member of the Islamic Jihad in Egypt who has since renounced extremist ideology.
"Despite the political developments and change of enemies over the decades, the basic idea centred on the establishment of an Islamic state and application of sharia still exists to this day," he said.
The group has promoted a harsh interpretation of sharia and has meted out an array of violent punishments to those who fail to comply with its rules.
There are significant doctrinal disagreements, however, between ISIS and the Taliban regarding the interpretation of Quranic verses and hadiths, Naim said, which could impede the resurgence of ISIS in Afghanistan on a wide scale.
"It is possible that ISIS elements could return to al-Qaeda's fold, having previously defected from it in the first place, in order to preserve their presence in Afghanistan in any form possible," Naim said.
He noted that there are only minor doctrinal differences between the Taliban and ISIS's Khorasan branch (ISIS-K), which is ideologically close to al-Qaeda.
"So we might also see in the next stage a series of pledges of allegiance made by ISIS emirs around the world to both the Taliban and to ISIS-K," he said.
Unified ideology for Taliban, al-Qaeda
In recent months, the continuation of the historical ties between the Taliban and al-Qaeda has been confirmed by a number of Western intelligence and media reports, said Cairo-based political analyst Abdul Nabi Bakkar.
In August, after the Taliban took over Afghanistan, Osama bin Laden's former security chief Amin-ul-Haq was seen on video returning to his home in Nangarhar province accompanied by Taliban fighters.
In April, Afghan special forces killed a senior member of al-Qaeda in the Indian Subcontinent (AQIS) together with a Taliban commander during an operation in Paktika province.
The two groups are driven by a unified ideology, Bakkar said, which presents the risk that al-Qaeda and other extremist groups like it will seek to expand and activate their presence in Afghanistan.
But the continuing relationship may not appear in the open at this time, Bakkar said, because the Taliban currently need to "calm matters and convince the countries of the world to recognise them and deal with their government".
The Taliban's need to gain legitimacy in the eyes of the world "will keep al-Qaeda's actions [in Afghanistan] hidden from the media and surveillance and possibly confined in the early stages to the mountains of Afghanistan", he said.
A particular area to watch is the rugged terrain particularly near the border with Pakistan, he said.