This is my first post here, so apologies in advance. Throughout the 1980s and 1990s, a symbiotic relationship between the Taliban and al-Qaeda developed out of necessity due to historically and geographically specific factors. Factors such as the struggle to create a government in Afghanistan after the collapse of the Republic of Afghanistan in 1992, the Mujahideen factions not agreeing on the formation of the new interim government resulting in fighting between the Mujahideen warlords, efforts by intelligence agencies such as ISI and KSA alongside efforts from political parties Jamiat Ulema-e-Islam to fund Madrasas in Pakistan in order to spread teaching of fundamentalist ideology (mainly Deobandi) in the Afghan refugee population residing in Pakistan, Bin Laden and MAK's role in funding and recruiting for foreign Mujahideen leading to the creation of a network which would be used to spread Jihad globally, Bin Laden's (and other MAK members) relations with Jalaluddin Haqqani, Mullah Omar, et cetera, the Taliban's lack of domestic allies and the Taliban's lack of political connections in the international community which could be remedied by working with al-Qaeda (whom had plethora of resource networks and connections - both politically and financially) in exchange for their protection and use of Taliban controlled land as staging grounds for attacks. Below I'll give some information on their backers (mainly ISI and KSA al-Mukhubarat al-A'Amah alongside little help from CIA) and opposition, give a broad overview of what allowed the Taliban to come to power in the first place alongside what allowed for the Taliban to take almost complete control of Afghanistan and how al-Qaeda fits into understanding the growth of the Taliban in the 1990s.
Now to discuss the question at hand I'll start by giving a chart of the Taliban's Allies and Foes, both domestic actors and foreign (state and non-state) actors followed by the 5 sections listed below:
| Chart | Allies | Foes |
|---|---|---|
| Domestic actors | Alumni of the Madrasas ran by Jamiat Ulema-e-Islam, Haqqani Network, Afghan Deobandi Pashtun refugees, al-Qaeda, et cetera. | 1994-1996: Interim Government and ally factions, Junbish and the Hezb-e Wahdat (allied with Hekmatyar). 1996-2001: United Islamic Front for the Salvation of Afghanistan, commonly known as the Northern Alliance formed as alliance of following groups - Jamiat (Tajik), Junbish (Uzbek), Ittehad (Pashtun), Harakat-e Inqilab (Pashtun), Harakat-e Islami (Non-Hazara Shi'a), Jabha (Sufi) and Hezb-e Wahdat (Hazara - Shi'a) alongside variety of Hazara nationalist groups, |
| Foreign state actors | Pakistan ISI (1994 onwards), KSA al-Mukhubarat al-A'Amah (1994-1998) and (sort-of) CIA. | Short period in1994: Pakistan ISI and KSA al-Mukhubarat al-A'Amah until ditching Hekmatyar. 1994-1998: Uzbekistan and Iran, but especially with formation of Northern Alliance. |
| Foreign non-state actors | Al-Qaeda. KSA and USA-based Islamic Charities, Foundations, Private individuals and Mosque collections such as [I am only going to list a few that were based in the US]: Benevolence International Foundation (CEO Enaam Arnaout Syrian-American Immigrant), Global Relief Foundation (based in Illinois, US), CARE international (based in Boston, US), Al-Kifah refugee center at Faruq Mosque in Brooklyn, US, alongside Maktab al-Khidamat (Osama Bin Laden's fundraising and recruitment network) and its offices in 33 American Cities. |
Background information on the state of Afghanistan two years prior to the Taliban's emergence - I'm going to address part of u/Georgy_K_Zhukov terrific old answer and cover some background for the time shortly before the emergence of the Taliban. When trying to understand the emergence of the Taliban and formation of the Islamic Emirate of Afghanistan, its important to understand the state of Afghanistan between 1992-1994 - so in 1992, the Republic of Afghanistan government lost the support from the Russian Federation (political successor of the Soviet Union) resulting in the government agreeing to make way for a new Interim government and giving the steering wheel to several Mujahideen factions, whom had already started negotiations aiming to form a coalition government. In April 1992, a settlement that ensured power-sharing among the factions had been signed - it gave Burhanuddin Rabbani (Founder of Jamiat-e Islami and arguably most powerful faction at that point in time) the position of President of the Transitional Islamic State of Afghanistan and gave Ahmad Shah Massoud (Top Military Commander of Jamiat-e Islami) the position of Minister of Defense. Jamiat's main challenger for position of top dog was a group led by Gulbuddin Hekmatyar called Hezb-e Islami, a party based around a Salafi interpretation of Pashtun Ultra-Nationalistm. While Jamiat and all other factions proceeded to sign the accords, Hekmatyar refused to participate and then marched his forces into the capital city Kabul, resulting in the beginning of a civil war between the 6 main factions eventually pushing all forces into complete exhaustion, barely able to defend themselves and control their territory.
Emergence of the student movement in Kandahar led by Mullah Omar - The Taliban emerged as a movement of Pashtun religious (Deobandi sect) students whom at one point were refugees in Pakistan and had studied at various Madrasas ran by Jamiat Ulema-e-Islam, a political party in Pakistan based around Deobandi fundamentalism. One of the more important Madrasas was the Darul Uloom Haqqania in Khyber Pakhtunkhwa, Pakistan (adjacent to Loya Patika region in Afghanistan), the dean of the school was a leader of one of the two Jamiat Ulema-e-Islam factions, his name was Sami-ul-Haq. This Madrasas was where many future Taliban leaders, such as Mullah Omar and Jalaluddin Haqqani would study the theology that would serve as the ideological framework for the Taliban movement and the Islamic Emirate of Afghanistan - also they studied alongside future al-Qaeda leaders such as Asim Umar. First emerging as a militia in August 1994, within weeks the Taliban grew to over 15,000 militants as students from Madrasas in Pakistan continued to join the movement. Fun fact - they choose the name the "Taliban" because its Pashto for students. The Taliban movement emerged first in Kandahar city, starting to try to take control of the city when it emerged in August 1994. After three months of fighting in Kandahar city, the Taliban forces took control at the start of November. From there they marched southward and by the start of the new year 1995 they had gained control of 12 of the 34 provinces of Afghanistan.
Taliban's path to statehood (August 1994 to August 14th 1998) - 6 months after first emerging, the Taliban controlled 12 of the 34 provinces of Afghanistan. On their four year anniversary in August 1998, specifically August 14th 1998, the Taliban controlled roughly 90% of Afghanistan - at that point the Taliban had been a "State" for two years, and went by the name Islamic Emirate of Afghanistan. The fighting that followed the failing of the Peshawar accords had weaken the various Mujahideen factions, such as the faction ran by Hekmatyar and supported by Pakistan ISI, due to years of pointless infighting and people were tired of the warlords extreme violence. Shortly before the emergence of the Taliban Movement, the violence reached extremely high levels in June 1994. These years of extremely violent and unrelenting infighting between Mujahideen warlords had created an environment where a handful of relatively weak militias controlled various bits of Afghanistan, and these militias were unable to stop an enemy that was as unified as the Taliban due to their unwillingness to negotiate with other factions to work together to prevent the growth of the Taliban. By August 14th 1998, the Taliban had captured the last major Afghan city - Mazar-i-Sharif. It had been 16 months since the Taliban first tried to take a city, resulting in a humiliating defeat where over 3,000 Taliban fighters had been executed. In July 1998, the Taliban started a new offensive to take the city - this time they had friends helping them out, al-Qaeda had sent roughly 500 fighters from their elite unit, 55th Arab Brigade based out of Kabul, to aid the Taliban in defeating the Northern Alliance forces at Mazar-i-Sharif. A month later, the city had fallen to the Taliban and their allies and on the 14th of August the Taliban controlled every major city in Afghanistan. al-Qaeda had played a role militarily in this major milestone for the Taliban, but they played an even larger role in the Taliban's conquest of Afghanistan - Bin Laden gave financial aid and assistance to the Taliban movement, reportedly managing roughly $8 billion of the Taliban's funds from 1994 to 1998. Not only did al-Qaeda end up being a good military assert and an extremely valuable financial asset for the Taliban, but they also used their international network to help Taliban establish political connections with countries such as the KSA and UAE.
Continued below.
I wrote this some time back, but it should be of interest as it does touch on some of this.