Afghan conflict

The Afghan conflict (دافغانستان جنګونه; ) refers to the series of events that have kept Afghanistan in a near-continuous state of armed conflict since the 1970s. Early instability followed the collapse of the Kingdom of Afghanistan in the largely non-violent 1973 coup d'état, which deposed Afghan monarch Mohammad Zahir Shah in absentia, ending his 40-year-long reign. With the concurrent establishment of the Republic of Afghanistan, headed by Mohammad Daoud Khan, the country's relatively peaceful and stable period in modern history came to an end. However, all-out fighting did not erupt until after 1978, when the Saur Revolution violently overthrew Khan's government and established the Democratic Republic of Afghanistan. Subsequent unrest over the radical reforms that were being pushed by the then-ruling People's Democratic Party of Afghanistan (PDPA) led to unprecedented violence, prompting a large-scale pro-PDPA military intervention by the Soviet Union in 1979. In the ensuing Soviet–Afghan War, the anti-Soviet Afghan mujahideen received extensive support from Pakistan, the United States, and Saudi Arabia in a joint covert effort that was dubbed Operation Cyclone.

Although the Soviets withdrew from Afghanistan in 1989, the various mujahideen factions continued to fight against the PDPA government, which collapsed in the face of the Peshawar Accord in 1992. However, the Peshawar Accord failed to remain intact in light of the mujahideen's representatives' inability to reach an agreement on a power-sharing coalition for the new government, triggering a multi-sided civil war between them. By 1996, the Taliban, supported by Pakistan's Inter-Services Intelligence, had seized the capital city of Kabul in addition to approximately 90% of the country, while northern Afghanistan remained under the authority of the anti-Taliban Northern Alliance. During this time, the Northern Alliance's Islamic State of Afghanistan enjoyed widespread international recognition and was represented at the United Nations, as opposed to the Taliban's Islamic Emirate of Afghanistan which only received diplomatic recognition from three nations. Despite the fall of Kabul to the Taliban, the Northern Alliance continued to resist in another civil war for the next five years.

After the September 11 attacks were carried out by al-Qaeda against the United States in 2001, the Taliban granted Saudi-born jihadist Osama bin Laden political asylum in the Islamic Emirate's territory. The group's subsequent non-compliance with the demand by the Bush administration to extradite him prompted the American-led invasion of Taliban-controlled Afghanistan, which bolstered the Northern Alliance by toppling the Islamic Emirate and installing the Afghan Transitional Authority in 2002. The invasion triggered the 20-year-long War in Afghanistan, in which NATO and NATO-allied countries fought alongside the nascent Islamic Republic of Afghanistan to combat the Taliban insurgency. During the Battle of Tora Bora, the American-led military coalition failed to capture bin Laden, who subsequently relocated to Pakistan and remained there until he was killed by U.S. SEAL Team Six in Abbottabad in 2011. Nonetheless, the fighting in Afghanistan continued, eventually leading to the 2020–2021 American withdrawal and ultimately ending with the 2021 Taliban offensive, which led to the re-establishment of the present-day Islamic Emirate. Though the country-wide war ended in 2021, clashes and unrest currently persist in some parts of Afghanistan  due to the ISIS–Taliban conflict and the anti-Taliban Republican insurgency. , the collapsed Islamic Republic of Afghanistan remains the internationally recognized government of the country.

Cold War era

 * Saur Revolution (1978): Overthrow of the Republic of Afghanistan and President Mohammad Daoud Khan by the People's Democratic Party of Afghanistan (PDPA). Establishment of the Democratic Republic of Afghanistan, a socialist state aligned with the Soviet Union.
 * Soviet–Afghan War (1979–1989): Military intervention by the Soviet Armed Forces in support of the PDPA against large-scale rebellions. Fighting primarily occurred between the Soviet–Afghan alliance and the Afghan mujahideen, who were backed by the United States, the United Kingdom, Pakistan, Saudi Arabia, China, and Iran, among others. Ended with the Soviet withdrawal from Afghanistan in 1989.
 * Afghan Civil War (1989–1992): Continuation of the conflict between the Afghan government and the Afghan mujahideen but without the involvement of Soviet forces. The Soviet Union continued to financially support the Afghan government in its fight and, likewise, mujahideen factions continued to receive support from the United States and Pakistan. The Democratic Republic of Afghanistan survived until the Battle of Kabul, during which the mujahideen established the Islamic State of Afghanistan (ISA).
 * Afghan Civil War (1992–1996): Began when various mujahideen groups withdrew support from and began fighting against the ISA, including Hezb-e Islami Gulbuddin, later largely replaced by the Taliban and al-Qaeda (all of whom were supported by Pakistan), Hezb-e Wahdat (who were supported by Iran), and Junbish-i Milli Islami (who were supported by Uzbekistan). Mujahideen loyal to the Islamic State of Afghanistan received support from Saudi Arabia. Ended with the Taliban seizing control of Kabul and most of the country in 1996, establishing the first Islamic Emirate of Afghanistan (IEA).
 * Afghan Civil War (1996–2001): Continuation of the previous phase of the war between militias loyal to either the ISA or the Taliban-ruled IEA. ISA loyalists reorganized into the Northern Alliance, including Hezb-e Wahdat and Junbish-i Milli Islami, who previously opposed the ISA. During the war, al-Qaeda stepped up its terrorist attacks against the United States, culminating in the September 11 attacks, after which the IEA lost almost all international support and diplomatic recognition from Pakistan, Saudi Arabia, and the United Arab Emirates.

Post-9/11 era

 * War in Afghanistan (2001–2021): Began with the United States' invasion of Afghanistan on 7 October 2001. Overthrow of the Taliban and eventual establishment of the internationally recognized Islamic Republic of Afghanistan. The war turned into a protracted Taliban insurgency, with Afghan government and NATO-led coalition troops fighting the reorganized Taliban and sporadically other Islamist militant groups such as al-Qaeda, the Haqqani network, Hezb-e Islami Gulbuddin, and the Islamic State – Khorasan Province. Bilateral negotiations between the Taliban and the United States led to an agreement whereby American and NATO troops withdrew amidst the 2021 Taliban offensive, in which the Islamic Republic fell, and the Taliban established the second Islamic Emirate of Afghanistan.
 * Islamic State–Taliban conflict (2015–present): Began in 2015, during the post-9/11 war, as Taliban dissident groups organized into the local branch of the Islamic State (not to be confused with the former Islamic State of Afghanistan). The group attacked the Taliban as well as NATO troops, but primarily targeted civilians. The insurgency is ongoing.
 * Republican insurgency in Afghanistan (2021–present): Began in 2021 when the remaining forces loyal to the fallen Islamic Republic reorganized into the National Resistance Front of Afghanistan in the Panjshir Valley. Despite having international recognition as the legitimate government of Afghanistan, the National Resistance Front has received no foreign support. Taliban forces captured the Panjshir Valley in September 2021, and leaders of the National Resistance Front fled to Tajikistan. Fighting is ongoing between the newly organized military of the Taliban and the small, scattered holdouts of the National Resistance Front in Panjshir Province and Baghlan Province.

By 2014, adding different estimates of casualties for some of these individual conflicts together, 1,405,111 to 2,084,468 people had been killed over the duration of the Afghanistan conflict.

Kingdom of Afghanistan
From 1933 to 1973, the Kingdom of Afghanistan experienced a lengthy period of peace and relative stability. It was ruled as a monarchy by King Zahir Shah, who belonged to the Afghan Musahiban Barakzai dynasty. In the 1960s, Afghanistan as a constitutional monarchy held limited parliamentary elections.

Republic of Afghanistan
Shah was overthrown by his cousin Mohammad Daoud Khan in July 1973, after discontent with the monarchy grew in the urban areas of Afghanistan. The country had experienced several droughts, and charges of corruption and poor economic policies were leveled against the ruling dynasty. Khan abolished the monarchy and declared the Republic of Afghanistan, and he became the first President of Afghanistan. He was supported by a faction of the People's Democratic Party of Afghanistan (PDPA), Afghanistan's communist party, which was founded in 1965 and enjoyed a strong relationship with the Soviet Union. In The Rise of the Taliban in Afghanistan: Mass Mobilization, Civil War, and the Future of the Region, Neamatollah Nojumi writes: "The establishment of the Republic of Afghanistan increased the Soviet investment in Afghanistan and the PDPA influence in the government's military and civil bodies."

In 1976, alarmed by the growing power of the PDPA and the party's strong affiliation with the Soviet Union, Khan tried to scale back the PDPA's influence. He dismissed PDPA members from their government posts, appointed conservative elements instead and finally announced the dissolution of the PDPA, arresting senior party members.

Democratic Republic of Afghanistan
On 27 April 1978, the PDPA and military units loyal to the PDPA revolted and killed Khan, his immediate family and bodyguards in a violent coup during the battle to seize control of the capital, Kabul, in the Saur Revolution. As the PDPA had chosen a weekend holiday to conduct the coup, when many government employees were having a day off, Khan was not able to fully activate the well-trained armed forces which remained loyal to him to counter the coup.

Khalqists vs. Parchamites
The PDPA formed a new government through a 'revolutionary council', which attempted to balance the two major competing factions within itself—the more radical and revolutionary Khalq and the more moderate and reformist Parcham. The Khalqist wing, led by the charismatic Nur Muhammad Taraki, who became the new chairman, gained supremacy in the aftermath of the revolution and adopted a program of land reform, abolition of feudal and tribal structures and equality for women. The council also prefixed the term "Democratic" to the country's Daoud-era name, making it the "Democratic Republic of Afghanistan." Though these reforms were supported by the army and city-dwelling population, they opposed the very traditional, religious and tribal customs of rural Afghanistan, which in turn led to strong rural and clerical opposition to the government and various anti-government uprisings. Around this time, the party came to be influenced by Hafizullah Amin, who undermined Taraki despite being a fellow Khalqist, purged Parchamites from the party and began ruthlessly cracking down on political opposition. Therefore, a hostile doctrine against any political dissent was adopted, whether inside or outside the party. Taraki, who had ruled for only about a year, was assassinated by Amin, who took over formal leadership of the country.

Mass executions
Amin was known for his independent and nationalist inclinations and was also seen by many as a ruthless leader. He has been accused of killing tens of thousands of Afghan civilians at Pul-e-Charkhi and other national prisons while cracking down on both the opposition and the Parchamites: 27,000 politically motivated executions reportedly took place at Pul-e-Charkhi prison alone. Afghans generally held Amin personally responsible for most of the repression, while the Soviet Union considered his government illegitimate, discredited and doomed to collapse in a civil war.

Soviet pro-Parchamite intervention
The Soviet Union secured an alliance with the more moderate Babrak Karmal and his Parchamite faction, invading Afghanistan on 24 December 1979 and originally meeting only limited resistance. Amin was deposed from power almost immediately, as he and 200 of his guards were killed during Operation Storm-333 on 27 December by Soviet Army Spetsnaz, replaced by Karmal. After deployment into Afghanistan, Soviet forces, whom the locals dubbed Shuravi, along with government forces would begin to engage in a protracted counterinsurgency war against a wide coalition of various anti-government insurgent forces, who in turn styled themselves as mujahideen—Islamic holy warriors.

Leadership of Babrak Karmal
Karmal declared a general amnesty for people imprisoned during Taraki and Amin's rule and restored the Afghan national symbols in place of the Khalqist red flag. He also granted several concessions to religious leaders and at least partially restored property seized during the original Khalqist land reform. However, this did not satisfy the opposition, as they considered his ascension to power during the Soviet intervention to be a mark that he would rule as a "Soviet puppet", thus continuing their insurgency against the government.

The Soviet government realized that a military solution to the conflict would require far more troops. Because of this they discussed troop withdrawals and searched for a political and peaceful solution as early as 1980, but they never took any serious steps in that direction until 1988. Early Soviet military reports confirm the difficulties the Soviet army had while fighting on the mountainous terrain, for which the Soviet army had no training. Parallels with the Vietnam War were frequently referred to by Soviet army officers.

Leadership of Mohammad Najibullah
Policy failures and the stalemate that ensued after the Soviet intervention led the Soviet leadership to become highly critical of Karmal's leadership. Under Mikhail Gorbachev, the Soviet Union was able to depose Karmal and replace him with Mohammad Najibullah. Karmal's leadership was seen as a failure by the Soviet Union because of the rise of violence and crime during his administration. Najibullah, another Parchamite, attempted to end the insurgency through a policy of accommodation and power sharing known as the National Reconciliation. He reversed several of his predecessor's unpopular reforms, abolished the one-party system, reinstated Islam as the state religion (though still maintaining a fairly secular legal and political setup), replaced the Revolutionary Council with a republican presidency and bicameral parliament, removed communist symbols deemed "provocative" to the opposition from the country's national emblem, dropped the "Democratic" prefix from the country's name, offered amnesty to mujahideen fighters and called for a six-month ceasefire in which fighting would stop in exchange for political negotiations intended to create a coalition government between the PDPA and various rebel groups in an attempt to end the country's crisis.

The talks did not succeed in reconciling the government and the mujahideen, though it was noted that they increased the government's popularity among urban areas, stabilized the armed forces and led to a round of defections from disillusioned mujahideen fighters to government militias. Despite this, the only insurgent group to fully reconcile with the government was the Shia-dominated Afghan Hizbullah. A mujahideen boycott of the 1988 elections, which were the first-ever Afghan elections to allow competing political parties, foiled Najibullah's attempt to reconstruct the nation's parliament, who in turn ordered 50 seats be left vacant to offer to the mujahideen if they decided to reconcile at a later date. Moreover, though Najibullah presented himself personally as a pious Muslim and restored the legal status of Islam, his government was unable to acquire the same Islamic credentials that the mujahideen forces wielded, which in turn meant that many of his reforms were not nearly as successful at convincing the devout, conservative rural and tribal population as Najibullah had hoped. Most importantly, Najibullah oversaw the withdrawal of Soviet forces from Afghanistan. The withdrawal was to be done according to the Geneva Accords, which entailed a full removal of Soviet forces from Afghanistan in exchange for the end of American and Pakistan support to the mujahideen.

Soviet withdrawal from Afghanistan
Throughout the Soviet withdrawal from Afghanistan, troop convoys came under attack by Afghan rebel fighters. In all, 523 Soviet soldiers were killed during the withdrawal. The total withdrawal of all Soviet troops from Afghanistan was completed in February 1989. The last Soviet soldier to leave was Lieutenant General Boris Gromov, leader of the Soviet military operations in Afghanistan at the time of the Soviet invasion. In total, 14,453 Soviet soldiers died during the Soviet–Afghan War. Though the Soviet forces did withdraw, the mujahideen refused to abide by the accords since they were not party to the negotiations. Furthermore, the United States reneged on its agreement and continued funding the insurgent groups even after the Soviet withdrawal. Najibullah's government further complained to the UN that Pakistan had also continued supplying, training and arming the rebel forces fighting against his government.

The Soviet war had a damaging impact on Afghanistan. The death of up to 2 million Afghans in the war has been described as a "genocide" by a number of sources. Five to ten million Afghans fled to Pakistan and Iran, amounting to 1/3 of the prewar population of the country, and another 2 million were displaced within the country. Pakistan's North-West Frontier Province functioned as an organisational and networking base for the anti-Soviet Afghan resistance, with the province's influential Deobandi ulama playing a major supporting role in promoting the jihad.

Fall of the PDPA
After the Soviet withdrawal, the Republic of Afghanistan under Najibullah continued to face resistance from the various mujahideen forces and instituted a state of emergency as he prepared to fend off the armed opposition on his own. Nevertheless, Najibullah received funding and arms from the Soviet Union until 1991 when the Soviet Union collapsed. For several years the Afghan army had actually increased their effectiveness past levels ever achieved during the Soviet military presence. The Afghan army was able to prove itself in combat during the Battle of Jalalabad in 1989, where it defeated a major assault on the city by mujahideen forces with U.S. and Pakistani backing, inflicting on them greater than 3,000 losses. Moreover, it was actually able to go on the offensive, forestalling several more attacks and preventing the governmental collapse that both American and Pakistani policymakers expected. This greatly increased army morale and demoralized the rebel groups, who had hoped for a quick post-withdrawal victory.

PDPA reforms and attempted coup d'état
In 1990, Najibullah reformed the PDPA into the Watan (Homeland) Party, which rejected Marxism–Leninism in favour of leftist Afghan nationalism. This did not necessarily have the desired effect, as it did not lead to significant drop in opposition, but did enrage several of his party members, not only Khalqists but also pro-Karmal Parchamites, who accused him of conceding too much of the Saur Revolution's gains to the mujahideen. Najibullah rejected the accusations, stating that his actions had been done in an attempt to preserve and protect the gains of the revolution, not sacrifice them. Regardless, these reforms caused further rifts within the ruling party. These tensions boiled over in the 1990 Afghan coup d'état attempt, in which a group of disillusioned Khalqists, led by Defence Minister Shahnawaz Tanai, attempted to overthrow Najibullah with the aid of Hezb-e Islami Gulbuddin and external support from Pakistan. The coup failed but led to many pro-Khalqist officers either fleeing the country or being sacked by Najibullah, considerably weakening the Afghan armed forces. The resulting instability led to a defeat in the Siege of Khost a year later to the hands of Pakistan-backed mujahideen forces after ten years of heavy fighting.

Dissolution of the Soviet Union
Another blow was dealt to his government in late 1991, as the dissolution of the Soviet Union signalled the end of foreign aid for Najibullah's Afghanistan, as Russian President Boris Yeltsin had neither the resources nor the desire to aid the Afghan government. Because of this and with Afghanistan being landlocked and not having a fuel supply of its own, the relatively modern and formidable Afghan Air Force essentially became grounded by a lack of fuel, which in turn made it all the more difficult to supply the army and various pro-government militias spread across Afghanistan's harsh geography, consequently causing a considerable increase in desertion. A few months later and with the war still continuing, Najibullah offered his entire government's resignation and voiced his support for a United Nations plan for a transitional administration including both Watan and all mujahideen groups in the country. This announcement led to the desertion of many of his own supporters, who feared the end of his government.

In these circumstances, Abdul Rashid Dostum, a leading army general, created an alliance with the Shura-e Nazar of Ahmad Shah Massoud and turned against Najibullah, taking with him over 40,000 previously pro-government soldiers. Najibullah sent a high-ranking army general to talk to Dostum and attempt to salvage the situation, only to learn that the general had also defected, alongside his own foreign minister. These defections devastated the Afghan Armed Forces' morale, and large parts of the Afghan government and armed forces capitulated to the forces of Massoud in early 1992. By April, Najibullah stated that he would be handing power to a seven-member transitional council and resigning immediately. Mujahideen forces loyal to Massoud and Dostum entered and captured Kabul shortly, thereafter, leading to the definitive end of PDPA/Watan rule in Afghanistan.

Najibullah was granted safety by the UN office in Kabul. He had obtained political asylum in India but was unable to leave as he was prevented from doing so by forces loyal to Massoud, Dostum and Hekmatyar. Because of this, he was forced to remain in the UN building until he was captured, dragged from a truck, castrated and executed by the Taliban several years later. After the Soviet defeat, The Wall Street Journal named Massoud "the Afghan who won the Cold War". He had defeated the Soviet forces nine times in his home region of the Panjshir Valley in northeastern Afghanistan.

Increased Pakistani interference
Pakistan tried to install Gulbuddin Hekmatyar in power in Afghanistan despite the opposition of all other mujahideen commanders and factions. As early as October 1990, the Inter-Services Intelligence had devised a plan for Hekmatyar to conduct a mass bombardment of the Afghan capital Kabul with possible Pakistani troop enforcements. This unilateral ISI-Hekmatyar plan came although the thirty most important mujahideen commanders had agreed on holding a conference inclusive of all Afghan groups to decide on a common future strategy. Peter Tomsen reports that the protest by the other mujahideen commanders was like a "firestorm". Ahmad Zia Massoud, the brother of Ahmad Shah Massoud, said that his faction strongly opposed the plan and like other factions would take measures if any "Pakistani troops reinforced Hekmatyar". Abdul Haq was reportedly so angry about the ISI plan that he was "red in the face". And Nabi Mohammad, another commander, pointed out that "Kabul's 2 million could not escape Hekmatyar's rocket bombardment—there would be a massacre." Representatives for Massoud, Haq and Wardak said that "Hekmatyar's rocketing of Kabul ... would produce a civilian bloodbath." The United States finally put pressure on Pakistan to stop the 1990 plan, which was subsequently called off until 1992.

Pakistan's objectives
After the fall of Najibullah's government in 1992, the Afghan political parties agreed on a power-sharing agreement, the Peshawar Accord. The Peshawar Accord created the Islamic State of Afghanistan and appointed an interim government for a transitional period to be followed by general democratic elections. Human Rights Watch said: "The sovereignty of Afghanistan was vested formally in the Islamic State of Afghanistan, an entity created in April 1992, after the fall of the Soviet-backed Najibullah government. ... With the exception of Gulbuddin Hekmatyar's Hezb-e Islami, all of the parties ... were ostensibly unified under this government in April 1992. ... Hekmatyar's Hezb-e Islami, for its part, refused to recognize the government for most of the period discussed in this report and launched attacks against government forces and Kabul generally. ... Shells and rockets fell everywhere."

Hekmatyar received operational, financial and military support from Pakistan. On Modern Afghanistan: A History of Struggle and Survival, Afghanistan expert Amin Saikal says that "Pakistan was keen to gear up for a breakthrough in Central Asia. ... Islamabad could not possibly expect the new Islamic government leaders ... to subordinate their own nationalist objectives in order to help Pakistan realize its regional ambitions. ... Had it not been for the ISI's logistic support and supply of a large number of rockets, Hekmatyar's forces would not have been able to target and destroy half of Kabul.

Iran–Saudi Arabia proxy conflict
In addition, Saudi Arabia and Iran—as competitors for regional hegemony—supported Afghan militias hostile towards each other. According to Human Rights Watch, Iran was assisting the Shia Hazara Hezb-i Wahdat forces of Abdul Ali Mazari, as Iran was attempting to maximize Wahdat's military power and influence. Saudi Arabia supported the Wahhabite Abdul Rasul Sayyaf and his Ittihad-i Islami faction. Conflict between the two militias soon escalated into a full-scale war. A publication by the George Washington University describes the situation: "[O]utside forces saw instability in Afghanistan as an opportunity to press their own security and political agendas."

Owing to the sudden initiation of the war, working government departments, police units or a system of justice and accountability for the newly created Islamic State of Afghanistan did not have time to form. Atrocities were committed by individuals of the different armed factions while Kabul descended into lawlessness and chaos as described in reports by Human Rights Watch and the Afghanistan Justice Project. Because of the chaos, some leaders increasingly had only nominal control over their (sub-)commanders. For civilians there was little security from murder, rape and extortion. An estimated 25,000 people died during the most intense period of bombardment by Hekmatyar's Hezb-i Islami and the Junbish-i Milli forces of Dostum, who had created an alliance with Hekmatyar in 1994. Half a million people fled Afghanistan. Human Rights Watch writes: "Rare ceasefires, usually negotiated by representatives of Ahmad Shah Massoud, Sibghatullah Mojaddedi or Burhanuddin Rabbani [the interim government], or officials from the International Committee of the Red Cross, commonly collapsed within days."

Rise of the Taliban government
Southern Afghanistan was not under the control of foreign-backed militias nor was it under the control of the government in Kabul; instead, it was ruled by local leaders such as Gul Agha Sherzai and their militias. In 1994, the Taliban (a movement which originated in Jamiat Ulema-e-Islam religious schools for Afghan refugees in Pakistan) also developed as a political-religious force in Afghanistan, reportedly in opposition to the tyranny of the local governor. Mullah Omar founded his movement with less than 50 armed madrassah students in his home town of Kandahar. When the Taliban took control of the city in 1994, they forced dozens of local Pashtun leaders who had presided over a situation of complete lawlessness and atrocities to surrender. In 1994, the Taliban took power in several provinces in southern and central Afghanistan.

In late 1994, most of the militia factions (Hezb-i Islami, Junbish-i Milli and Hezb-i Wahdat) which had been fighting in the battle for control of Kabul were defeated militarily by forces of the Islamic State's Secretary of Defense Massoud. Bombardment of the capital came to a halt. Massoud tried to initiate a nationwide political process with the goal of national consolidation and democratic elections, also inviting the Taliban to join the process. Massoud had united political and cultural personalities, governors, commanders, clergymen and representatives to reach a lasting agreement. Massoud, like most people in Afghanistan, saw this conference as a small hope for democracy and for free elections. His favourite for candidacy to the presidency was Dr. Mohammad Yusuf, the first democratic prime minister under Zahir Shah, the former king. In the first meeting representatives from 15 different Afghan provinces met, in the second meeting there were already 25 provinces participating. Massoud went unarmed to talk to several Taliban leaders in Maidan Shar, but the Taliban declined to join this political process. When Massoud returned safely, the Taliban leader who had received him as his guest paid with his life: he was killed by other senior Taliban for failing to execute Massoud while the possibility was there.

Founding of the Islamic Emirate
The Taliban started to shell Kabul in early 1995 but they were defeated by the forces of the Islamic State government under Massoud. Amnesty International, referring to the Taliban offensive, wrote in a 1995 report: "This is the first time in several months that Kabul civilians have become the targets of rocket attacks and shelling aimed at residential areas in the city." The Taliban's early victories in 1994 were followed by a series of defeats that resulted in heavy losses. Pakistan provided strong support to the Taliban. Many analysts like Amin Saikal describe the Taliban as developing into a proxy force for Pakistan's regional interests which the Taliban deny. On 26 September 1996, as the Taliban, with military support from Pakistan and financial support from Saudi Arabia, prepared for another major offensive, Massoud ordered a full retreat from Kabul. The Taliban seized Kabul on 27 September 1996 and established the Islamic Emirate of Afghanistan.

Taliban offensives
The Taliban imposed on the parts of Afghanistan under their control their interpretation of Islam. The Physicians for Human Rights (PHR) stated: "To PHR's knowledge, no other regime in the world has methodically and violently forced half of its population into virtual house arrest, prohibiting them on pain of physical punishment." Women were required to wear the all-covering burqa, they were banned from public life and denied access to health care and education, windows needed to be covered so that women could not be seen from the outside, and they were not allowed to laugh in a manner that could be heard by others. The Taliban, without any real court or hearing, cut people's hands or arms off when they were accused of stealing. Taliban hit-squads watched the streets, conducting arbitrary brutal public beatings.

The Taliban began preparing offensives against the remaining areas controlled by Massoud and Dostum. The former foes responded by allying to form the United Front (Northern Alliance) against the Taliban. In addition to the dominantly Tajik forces of Massoud and the Uzbek forces of Dostum, the United Front included Hazara factions and Pashtun forces under the leadership of commanders such as Abdul Haq or Haji Abdul Qadir. Prominent politicians of the United Front were Afghan Prime Minister Abdul Rahim Ghafoorzai and the United Front's foreign minister Abdullah Abdullah. From the Taliban conquest in 1996 until November 2001 the United Front controlled roughly 30% of Afghanistan's population in provinces such as Badakhshan, Kapisa, Takhar and parts of Parwan, Kunar, Nuristan, Laghman, Samangan, Kunduz, Ghōr and Bamyan.

Atrocities by Arab jihadists
According to a 55-page report by the United Nations, the Taliban, while trying to consolidate control over northern and western Afghanistan, committed systematic massacres against civilians. UN officials stated that there had been "15 massacres" between 1996 and 2001. They also said "these have been highly systematic and they all lead back to the [Taliban] Ministry of Defense or to Mullah Omar himself." In a major effort to retake the Shomali plains, the Taliban indiscriminately killed civilians, while uprooting and expelling the population. Kamal Hossein, a special reporter for the UN, reported on these and other war crimes. Upon taking Mazar-i-Sharif in 1998, about 4,000 civilians were executed by the Taliban and many more reported tortured. The Taliban especially targeted people of Shia religious or Hazara ethnic background. Among those killed in Mazari-i-Sharif were several Iranian diplomats. Others were kidnapped by the Taliban, touching off a hostage crisis that nearly escalated to a full-scale war, with 150,000 Iranian soldiers massed on the Afghan border at one time. It was later admitted that the diplomats were killed by the Taliban, and their bodies were returned to Iran.

The documents also reveal the role of Arab and Pakistani support troops in these killings. Osama Bin Laden's so-called 055 Brigade was responsible for mass killings of Afghan civilians. The report by the United Nations quotes eyewitnesses in many villages describing Arab fighters carrying long knives used for slitting throats and skinning people.

Role of Pakistan's ISI
Pakistan's ISI wanted the mujahideen to establish a government in Afghanistan. The director-general of the ISI, Hamid Gul, was interested in an Islamic revolution which would transcend national borders, not just in Afghanistan and Pakistan but also in Central Asia. To set up the proposed mujahideen government, Gul ordered an assault on Jalalabad with the intent on using it as the capital for the new government Pakistan was interested in establishing in Afghanistan. The Taliban were largely funded by ISI in 1994. The ISI used the Taliban to establish a regime in Afghanistan which would be favorable to Pakistan, as they were trying to gain strategic depth. Since the creation of the Taliban, the ISI and the Pakistani military have given financial, logistical and military support.

According to Pakistani Afghanistan expert Ahmed Rashid, "between 1994 and 1999, an estimated 80,000 to 100,000 Pakistanis trained and fought in Afghanistan" on the side of the Taliban. Peter Tomsen stated that Pakistani military and ISI officers along with thousands of regular Pakistani Armed Forces personnel had been involved in the fighting in Afghanistan. In 2001 alone, according to several international sources, 28,000–30,000 Pakistani nationals, 14,000–15,000 Afghan Taliban and 2,000–3,000 Al Qaeda militants were fighting against anti-Taliban forces in Afghanistan as a roughly 45,000-strong military force. Pakistani President Pervez Musharraf – then as Chief of Army Staff – was responsible for sending thousands of Pakistanis to fight alongside the Taliban and Bin Laden against the forces of Massoud. Of the estimated 28,000 Pakistani nationals fighting in Afghanistan, 8,000 were militants recruited in madrassas filling regular Taliban ranks. A 1998 document by the U.S. State Department confirms that "20–40 percent of [regular] Taliban soldiers are Pakistani." The document further states that the parents of those Pakistani nationals "know nothing regarding their child's military involvement with the Taliban until their bodies are brought back to Pakistan." According to the U.S. State Department report and reports by Human Rights Watch, the other Pakistani nationals fighting in Afghanistan were regular Pakistani soldiers especially from the Frontier Corps but also from the Pakistani Army providing direct combat support.

In 2000, Human Rights Watch wrote: "Of all the foreign powers involved in efforts to sustain and manipulate the ongoing fighting [in Afghanistan], Pakistan is distinguished both by the sweep of its objectives and the scale of its efforts, which include soliciting funding for the Taliban, bankrolling Taliban operations, providing diplomatic support as the Taliban's virtual emissaries abroad, arranging training for Taliban fighters, recruiting skilled and unskilled manpower to serve in Taliban armies, planning and directing offensives, providing and facilitating shipments of ammunition and fuel, and ... directly providing combat support.

On 1 August 1997, the Taliban launched an attack on Sheberghan, the main military base of Dostum. Dostum has said the reason the attack was successful was that 1,500 Pakistani commandos took part and that the Pakistani Air Force also gave support. In 1998, Iran accused Pakistani troops of war crimes at Bamiyan and claimed that Pakistani warplanes had, in support of the Taliban, bombarded Afghanistan's last Shia stronghold. The same year Russia said, Pakistan was responsible for the "military expansion" of the Taliban in northern Afghanistan by sending large numbers of Pakistani troops some of whom had subsequently been taken as prisoners by the anti-Taliban United Front.

In 2000, the UN Security Council imposed an arms embargo against military support to the Taliban, with UN officials explicitly singling out Pakistan. The UN secretary-general implicitly criticized Pakistan for its military support, and the Security Council "expressed deep distress over reports of involvement in the fighting, on the Taliban side, of thousands of non-Afghan nationals, some of whom were below the age of 14." In July 2001, several countries including the United States, accused Pakistan of being "in violation of UN sanctions because of its military aid to the Taliban." The Taliban also obtained financial resources from Pakistan. In 1997 alone, after the capture of Kabul by the Taliban, Pakistan gave $30 million in aid and a further $10 million for government wages.

In 2000, British Intelligence reported that the ISI was taking an active role in several Al Qaeda training camps. The ISI helped with the construction of training camps for both the Taliban and Al Qaeda. From 1996 to 2001 the Al Qaeda of Osama Bin Laden and Ayman al-Zawahiri became a state within the Taliban state. Bin Laden sent Arab and Central Asian Al-Qaeda militants to join the fight against the United Front, among them his 055 Brigade.

Anti-Taliban resistance
Dostum and his forces were defeated by the Taliban in 1998. Dostum subsequently went into exile. Massoud became the only leader to remain in Afghanistan and who was able to defend vast parts of his area against the Taliban. In the areas under his control, Massoud set up democratic institutions and signed the Women's Rights Declaration. In the area of Massoud, women and girls did not have to wear the Afghan burqa. They were allowed to work and to go to school. In at least two known instances, Massoud personally intervened against cases of forced marriage. To Massoud there was reportedly nothing worse than treating a person like an object. He stated: "It is our conviction and we believe that both men and women are created by the Almighty. Both have equal rights. Women can pursue an education, women can pursue a career, and women can play a role in society — just like men."

In Massoud: From Warrior to Statesman, author Pepe Escobar writes "Massoud is adamant that in Afghanistan women have suffered oppression for generations. He says that 'the cultural environment of the country suffocates women. But the Taliban exacerbate this with oppression.' His most ambitious project is to shatter this cultural prejudice and so give more space, freedom and equality to women — they would have the same rights as men." While it was Massoud's stated conviction that men and women are equal and should enjoy the same rights, he also had to deal with Afghan traditions which he said would need a generation or more to overcome. In his opinion that could only be achieved through education. Humayun Tandar, who took part as an Afghan diplomat in the 2001 International Conference on Afghanistan in Bonn, said that "strictures of language, ethnicity, region were [also] stifling for Massoud. That is why ... he wanted to create a unity which could surpass the situation in which we found ourselves and still find ourselves to this day." This applied also to strictures of religion. Jean-José Puig describes how Massoud often led prayers before a meal or at times asked his fellow Muslims to lead the prayer but also did not hesitate to ask a Christian friend Jean-José Puig or the Jewish Princeton University Professor Michael Barry: "Jean-José, we believe in the same God. Please, tell us the prayer before lunch or dinner in your own language."

Human Rights Watch cites no human rights crimes for the forces under direct control of Massoud for the period from October 1996 until the assassination of Massoud in September 2001. One million people fled the Taliban, many to the area of Massoud. In its Inside the Taliban documentary, National Geographic states: "The only thing standing in the way of future Taliban massacres is Ahmad Shah Massoud." The Taliban repeatedly offered Massoud a position of power to make him stop his resistance, but Massoud declined. He explained in one interview: "The Taliban say: 'Come and accept the post of prime minister and be with us', and they would keep the highest office in the country, the presidentship. But for what price?! The difference between us concerns mainly our way of thinking about the very principles of the society and the state. We can not accept their conditions of compromise, or else we would have to give up the principles of modern democracy. We are fundamentally against the system called "the Emirate of Afghanistan." In another interview, he was quoted as saying: "There should be an Afghanistan where every Afghan finds himself or herself happy. And I think that can only be assured by democracy based on consensus." With his proposals for peace, Massoud wanted to convince the Taliban to join a political process leading towards nationwide democratic elections in a foreseeable future. Massoud stated: "The Taliban are not a force to be considered invincible. They are distanced from the people now. They are weaker than in the past. There is only the assistance given by Pakistan, Osama bin Laden and other extremist groups that keep the Taliban on their feet. With a halt to that assistance, it is extremely difficult to survive."

In early 2001, Massoud employed a new strategy of local military pressure and global political appeals. Resentment was increasingly gathering against Taliban rule from the bottom of Afghan society including the Pashtun areas. Massoud publicized their cause of "popular consensus, general elections and democracy" worldwide. At the same time he was very wary not to revive the failed Kabul government of the early 1990s. In 1999, he began training police forces specifically to keep order and protect the civilian population, in case the United Front was successful. Massoud also addressed the European Parliament in Brussels asking the international community to provide humanitarian help to the people of Afghanistan. He stated that the Taliban and Al Qaeda had introduced "a very wrong perception of Islam" and that without the support of Pakistan and Bin Laden the Taliban would not be able to sustain their military campaign for up to a year. On this visit to Europe, he also warned that his intelligence had gathered information about a large-scale attack on U.S. soil being imminent. The president of the European Parliament, Nicole Fontaine, called him the "pole of liberty in Afghanistan".

On 9 September 2001, Massoud was the target of a suicide attack by two Arabs posing as journalists at Khwaja Bahauddin in the Takhar Province. Massoud died in a helicopter taking him to a hospital. The funeral, though in a rather rural area, was attended by hundreds of thousands of mourning people. The assassination was not the first time Al-Qaeda, the Taliban, the Pakistani ISI—and before them the Soviet KGB, the Afghan Communist KHAD and Hekmatyar—had tried to assassinate Massoud. He survived countless assassination attempts over a period of 26 years. The first attempt on Massoud's life was carried out by Hekmatyar and two Pakistani ISI agents in 1975, when Massoud was only 22 years old. In early 2001, Al-Qaeda would-be assassins were captured by Massoud's forces while trying to enter his territory.

9/11 attacks and American involvement
The assassination of Massoud is believed to have a strong connection to the September 11, 2001, attacks on the United States, which killed nearly 3,000 people and appeared to be the terrorist attack that Massoud had warned the European Parliament about when he made his speech in the presence of it several months earlier.

John P. O'Neill was a counter-terrorism expert and the assistant director of the FBI until late 2001. He retired from the FBI and was offered the position of director of security at the World Trade Center (WTC). He took the job at the WTC two weeks before 9/11. On 10 September 2001, O'Neill allegedly told two of his friends, "We're due. And we're due for something big.... Some things have happened in Afghanistan (referring to the assassination of Massoud). I don't like the way things are lining up in Afghanistan...I sense a shift, and I think things are going to happen...soon." O'Neill died when the South Tower collapsed.

After the terrorist attacks of 11 September 2001, Massoud's United Front troops, with American air support, ousted the Taliban from power in Kabul in Operation Enduring Freedom. In November and December 2001, the United Front gained control of much of the country and played a crucial role in establishing the post-Taliban interim government of Hamid Karzai in late 2001.

Afghan Transitional Authority
The U.S.-led war in Afghanistan began on 7 October 2001, as Operation Enduring Freedom. It was designed to capture or kill Osama bin Laden and al-Qaeda militants, as well as replace the Taliban with a U.S.-friendly government. The Bush Doctrine stated that, as policy, it would not distinguish between al-Qaeda and nations that harbor them. Several Afghan leaders were invited to Germany in December 2001 for the UN sponsored Bonn Agreement, which was to restore stability and governance in their country. In the first step, the Afghan Transitional Administration was formed and was installed on 22 December. Chaired by Hamid Karzai, it numbered 30 leaders and included a Supreme Court, an Interim Administration, and a Special Independent Commission.

Founding of the Islamic Republic
A loya jirga (grand assembly) was convened in June 2002 by former King Zahir Shah, who returned from exile after 29 years. Karzai was elected president for the two years in the jirga, in which the Afghan Interim Authority was also replaced with the Transitional Islamic State of Afghanistan (TISA). A constitutional loya jirga was held in December 2003, adopting the 2004 constitution, with a presidential form of government and a bicameral legislature. Karzai was elected in the 2004 presidential election followed by winning a second term in the 2009 presidential election. Both the 2005 and the 2010 parliamentary elections were also successful.

In the meantime, the reconstruction process of Afghanistan began in 2002. There were more than 14,000 reconstruction projects, such as the Kajaki Dam and the Salma Dam. Many of these projects were supervised by the Provincial Reconstruction Teams. The World Bank Afghanistan Reconstruction Trust Fund was set up in 2002, which was financed by 24 international donor countries and spent more than $1.37 billion as of 2007. Approximately 30 billion dollars were provided by the international community for the reconstruction of Afghanistan, most of it from the United States. In 2002, the world community allocated $4 billion at the Tokyo conference followed by another $4 billion in 2004. In February 2006, $10.5 billion were committed for Afghanistan at the London Conference and $11 billion from the United States in early 2007. Despite these vast investments by the international community, the reconstruction effort's results were mixed. Implementation of development projects was frequently marred by lack of coordination, knowledge of local conditions, and sound planning on the side of international donors as well as by corruption and inefficiency on the side of Afghan government officials. On the provincial and national level, projects such as the National Solidarity Programme, inter-provincial road construction, and the U.S.-led revamping of rural health services met with more success.

Nation-building in Afghanistan
NATO and Afghan troops led many offensives against the Taliban in this period. By 2009, a Taliban-led shadow government began to form, complete with their own version of mediation court. In 2010, U.S. President Barack Obama deployed an additional 30,000 soldiers over a period of six months and proposed that he would begin troop withdrawals by 2012. At the 2010 International Conference on Afghanistan in London, Karzai said he intended to reach out to the Taliban leadership (including Mullah Omar, Sirajuddin Haqqani and Gulbuddin Hekmatyar). Supported by senior U.S. officials Karzai called on the group's leadership to take part in a loya jirga meeting to initiate peace talks. According to The Wall Street Journal, these steps were initially reciprocated with an intensification of bombings, assassinations and ambushes.

Many Afghan groups (including the former intelligence chief Amrullah Saleh and opposition leader Dr. Abdullah Abdullah) believed that Karzai's plan aimed to appease the insurgents' senior leadership at the cost of the democratic constitution, the democratic process and progress in the field of human rights, especially women's rights. Abdullah stated: "I should say that Taliban are not fighting in order to be accommodated. They are fighting in order to bring the state down. So it's a futile exercise, and it's just misleading. ... There are groups that will fight to the death. Whether we like to talk to them or we don't like to talk to them, they will continue to fight. So, for them, I don't think that we have a way forward with talks or negotiations or contacts or anything as such. Then we have to be prepared to tackle and deal with them militarily. In terms of the Taliban on the ground, there are lots of possibilities and opportunities that with the help of the people in different parts of the country, we can attract them to the peace process; provided, we create a favorable environment on this side of the line. At the moment, the people are leaving support for the government because of corruption. So that expectation is also not realistic at this stage."

According to a report by the United Nations, the Taliban were responsible for 76% of civilian casualties in 2009. Afghanistan was struggling to rebuild itself while dealing with the results of 30 years of war, corruption among high-level politicians and the ongoing Taliban insurgency which according to different scientific institutes such as the London School of Economics, senior international officials, such as former United States Chairman of the Joint Chief of Staff Admrial Michael Mullen, believed the Taliban was backed by the ISI.

At the end of July 2010, the Netherlands became the first NATO ally to end its combat mission in Afghanistan after 4 years military deployment including the most intense period of hostilities. They withdrew 1,900 troops. The Atlantic Council described the decision as "politically significant because it comes at a time of rising casualties and growing doubts about the war." Canada withdrew troops in 2011, but about 900 were left to train Afghani soldiers.

In February 2012, a small number of American service members burned several copies of the Quran. Some Afghans responded by staging massive demonstrations and riots in Kabul and other areas. Assailants killed several American military personnel, including two officers in the Interior Ministry building following this event. On 11 March 2012, an American soldier, Robert Bales, killed 16 civilians in the Kandahar massacre.

According to ISAF there were about 120,000 NATO-led troops in Afghanistan per December 2012, of which 66,000 were US troops and 9,000 British. The rest were from 48 countries. A process of handing over power to local forces had started and according to plans a majority of international troops would leave in 2014. On 24 November 2013, Karzai held a loya jirga and imposed a ban on NATO house raids. This ban was put in place, and NATO soldiers were instructed to adhere to it. In December 2013, a house raid in Zabul Province was exceptionally carried out by two NATO soldiers. Karzai condemned this in a highly publicised speech. On 3 January 2014 a bomb blast was heard by NATO soldiers in a base in Kabul; there were no reported casualties or injuries. The day after, a bomb hit a U.S. military base in Kabul and killed one U.S. citizen. The bomb was planted by the Taliban, and the American service member was the first combat casualty in Afghanistan in that year. The Taliban immediately claimed responsibility for the attack.

Peace negotiations in Qatar
On 1 May 2015 the media reported a scheduled meeting in Qatar between Taliban insurgents and peacemakers, including the Karzai, about ending the war. In 2016, the government signed a peace deal with Hekmatyar's Hezb-e Islami, which was at the time the second largest anti-government insurgent after the Taliban. The deal proved controversial, and several sectors of Afghan society protested against it because of the Hekmatyar's alleged war crimes.

Tensions between the U.S. and Pakistan worsened as U.S. President Donald Trump accused Pakistan of harboring the Taliban. Afghan President Ashraf Ghani offered unconditional peace talks to the Taliban, offering them legal status as a regular political party, alongside the release of Taliban prisoners. Over 20 nations and organizations backed the deal, but it was rejected by the Taliban who refused to negotiate with the Afghan government. The Taliban insisted on only negotiating directly with the United States and only upon a full U.S. withdrawal from the country—a demand the U.S. rejected.

An unprecedented three-day ceasefire was negotiated in 2018 around the Eid al-Fitr celebrations, with Taliban members openly approaching and talking to civilians and government forces. The ceasefire was widely celebrated, and Ghani announced it would be extended by ten days, with some societal leaders calling for it to be made permanent. The Taliban, however, rejected the extension and relaunched their military campaign against the government at the end of the original three-day period.

As the Afghan government had fallen into a major dispute over the 2019 Afghan presidential election, in which both Ghani and his rival Abdullah Abdullah claimed victory, a power-sharing deal between the two men was signed, which assigned responsibility for the peace negotiations to the latter.

Taliban–United States agreement
Eventually and after several years of back-and-forth negotiations, the U.S. Trump Administration struck a major deal with the Taliban in 2020, known as the Doha Agreement. The deal provided for a full but staggered U.S. withdrawal from Afghanistan in exchange for a Taliban pledge not to allow Al-Queda to reestablish itself in the country and commit itself to talks with the Afghan government (which was not a party to the agreement). The deal also required the Afghan president to release 5,000 Taliban prisoners in exchange for a Taliban release of 1,000 captive Afghan soldiers. Ghani, having never agreed to the deal, rejected the prisoner release, stating that it was not a U.S. prerogative and adding that he would reject any other releases as a prerequisite to Taliban-Afghan government talks. The Taliban replied by reiterating that they would not start any talks with the Afghan government until the 5,000 prisoners were released.

The situation led to an increase in Taliban attacks, with the group having launched more than 4,500 attacks on government forces during the 45-day period following the signing of the Doha Agreement—a 70% increase compared to the same period during the previous year. As the U.S. had stopped conducting airstrikes on Taliban targets as part of the agreement (in exchange for a halting of Taliban attacks on U.S. forces), Taliban casualties dropped by about two thirds during this period. Following what was described as some of the bloodiest fighting in 19 years, the U.S. conducted several airstrikes against the group in early March 2020. Ghani agreed on releasing 1,500 Taliban prisoners, so long as those prisoners signed a pledge not to return to combat once released. The Taliban rejected this move, insisting on the full and unconditional release of the full 5,000 prisoner list. By August, the government agreed to free the 5,000 Taliban captives but stated that it could not release 400 of them, as they had been accused of serious crimes against civilians, calling a loya jirga to decide their fate. It ruled in favor of release, and all of the prisoners were freed. Following these developments, the first intra-Afghan talks between the Taliban and Afghan government were held in Qatar.

American withdrawal and 2021 Taliban offensive
In April 2021, the newly inaugurated U.S. President Joe Biden announced that all U.S. troops would withdraw from the country by 11 September 2021, the 20-year anniversary of the 9/11 attacks. He later brought this date forward to 31 August. As U.S. forces started to withdraw in May, the Taliban stepped up attacks on the Afghan government. The group began by first capturing the countryside to surround regional capitals, then taking those capitals without facing any major resistance. The United States Intelligence Community warned in July that the Afghan government was likely to collapse 6–12 months after the U.S. withdrawal. Biden stated that he would not cease or delay the withdrawal, regardless of the situation.

Collapse of the Islamic Republic
By 15 August, almost the entire country was under the control of the Taliban, who had already encircled and were preparing to enter the nation's capital. Ghani fled the country to Tajikistan, and Kabul was captured that same day, with the entire political and military apparatus of the Islamic Republic having collapsed. The remainder of the NATO forces in the country occupied the Hamid Karzai International Airport in Kabul, evacuating hundreds of thousands of servicemen and civilians. In their last act while in Afghanistan, coalition forces destroyed or damaged most of what was left behind in the airport to prevent it from being used by the Taliban, totalling 75 aircraft and over 100 vehicles and other equipment, alongside the airport's anti-air defences, before definitively leaving the country on 30 August, thus meeting Biden's withdrawal deadline.

Biden defended his decision, stating that he did not wish to prolong the "forever war" and blamed the Afghan authorities for not having found a political settlement and fleeing the country for the collapse of the country's government, adding that the collapse had nevertheless "unfolded more quickly than anticipated". According to Biden, the American mission in the country had never been nation-building, but instead a pre-emption of attacks on the U.S. homeland, which he considered to have been a success. Following the coalition's withdrawal, Taliban forces captured the airport and announced they would form a new government shortly thereafter.

Despite the call to have some refugees admitted to the U.S. after the withdrawal of NATO troops, only a tiny percentage of vulnerable Afghans seeking to move to the United States under a refugee resettlement program were admitted to the U.S. Refugees admitted through the P-2 criteria by the State Department's pre-existing Priority 1 program had the only option to be referred to the U.N. High Commissioner for Refugees or a designated NGO.

Re-establishment of the Islamic Emirate
As the Taliban took over Kabul, a Coordination Council was formed to transfer power to the Taliban, consisting of former mujahideen and Hezb-e Islami commander Gulbuddin Hekmatyar, former President Hamid Karzai and political leader Abdullah Abdullah. The latter two then met with Taliban representatives with the stated goal of ensuring safety and returning normalcy to the capital. However, it was reported that the two would likely not be a part of the future Taliban government. The New York Times reported that Karzai had been forced out of his home after the Taliban disarmed his guards and took over security at his residence, instead moving in to live in Abdullah's house. According to a source cited by the CNN, both had effectively been placed under house arrest, with their security details removed and at the mercy of the Taliban.

Anti-Taliban uprisings
Following the Taliban's victory across Afghanistan, the Islamic Republic's vice president and long-time opponent of the Taliban, Amrullah Saleh, cited provisions in the 2004 Constitution of Afghanistan which would make him acting president of the country. In doing so, he appealed to a sense of continuity of the Islamic Republic, which would lend him political legitimacy. As Kabul, alongside the vast majority of Afghanistan, was under Taliban control, he joined forces with Ahmad Massoud, son of former mujahideen commander Ahmad Shah Massoud, in declaring the National Resistance Front of Afghanistan (also known as the Panjshir Resistance), an anti-Taliban coalition based in the Panjshir Valley. In turn, he was recognized as president by Massoud, as well as Defence Minister Bismillah Khan Mohammadi. A small-scale uprising led by the group in August 2021 succeeded in ousting the Taliban from three districts, establishing its own control in the valley.

The front, often compared to the Northern Alliance, reached a ceasefire with the Taliban shortly thereafter. The ceasefire did not last long and by the start of September the Taliban had launched an assault against the Panjshir resistance. By 3 September, the Taliban claimed to have defeated the resistance, establishing Taliban control over the entirety of Afghanistan for the first time in the country's history. These claims were dismissed as lies by resistance forces, which in turn claimed they were still in control of much of their positions and were actively fighting the Taliban. Fighting continued into the following day, and Mark Milley, Chairman of the U.S. Joint Chiefs of Staff, warned that the situation could develop into a full-scale civil war.

At the same time, notable regional leaders Tajik Atta Muhammad Nur and Uzbek Abdul Rashid Dostum (the PDPA-era commander who turned on Najibullah in 1991 and formed his own Uzbek-dominated and relatively left-secular political movement Junbish) fled the country to avoid what they dubbed conspiracy as Mazar-i-Sharif fell to the Taliban. The two had been bitter political rivals but joined forces in the face of the Taliban advance. According to Nur, the local equipment of the armed forces had been handed over to the Taliban in a "cowardly plot" intended to entrap him and Dostum, which led to the fall of the city. The two joined with other regional strongmen and politicians in creating a front for negotiations with the Taliban, in which they would hope to achieve concessions from the predominantly Pashtun group for their respective local movements and ethnicities. The two stated that they would never accept a surrender and were preparing for armed anti-Taliban resistance should the talks fail, prior to the ultimate fall of the Panjshir Valley to the Taliban the following day. Both Saleh and Massoud fled the Panjshiri capital but remained in the province.

Afghanistan–Iran border clashes
Afghan–Iranian clashes occurred in December 2021, overlapping with the Republican insurgency in Afghanistan, between the restored Islamic Emirate of Afghanistan and Iran in Nimruz over border checkpoints. It resulted in a de facto Taliban victory, with the Islamic Emirate capturing various border checkpoints. However, the Taliban later withdrew from the checkpoints and things returned to status quo ante bellum.