The Taliban insurgent group and allied militants conducted a military offensive in 2021 that led to the fall of the Islamic Republic of Afghanistan and the end of the nearly 20-year war in Afghanistan that had begun following the United States invasion of the country. The Taliban victory had widespread domestic and international ramifications regarding human rights and proliferation of terrorism. The offensive included a continuation of the bottom-up succession of negotiated or paid surrenders to the Taliban from the village level upwards that started following the February 2020 US–Taliban deal.

The offensive began on 1 May 2021, coinciding with the withdrawal of the United States's 2,500 troops in Afghanistan, and those belonging to other international allies. Large numbers of armed civilians, including women, volunteered with the Afghan Army in defense, while some former warlords, notably Ismail Khan, were also recruited. Despite this, the Taliban managed to make significant territorial gains in the countryside, increasing the number of districts it controlled from 73 to 223 in the first three months of the offensive. On 6 August, the Taliban launched an assault on the provincial capitals, with most of the towns surrendering without a fight, culminating with victories in weeks-long battles of major cities Herat, Kandahar and Lashkargah on 13 August. On 15 August, President Ashraf Ghani fled the country and the Taliban captured the Afghan capital Kabul with only sporadic resistance; thus, the Islamic Republic of Afghanistan's government fell, resulting in the de facto takeover of the country and the reinstatement of the Islamic Emirate of Afghanistan. The speed of the Taliban's takeover came as a surprise to many, including the governments of the United States and their allies, Russia and the Taliban themselves.

Factors prior to May 2021 included the Taliban's effective use of online social media, its strategic choice of attacking northern provinces, and the Taliban's freedom of movement on the main Afghan highways that resulted from the Afghan National Security Forces (ANSF) following the US-recommended strategy of sacrificing rural areas in favour of defending key urban centres. Factors in the ANSF loss to the Taliban included the February 2020 and April 2021 drops in US support, in which technical, proprietary software and logistics support, in particular aerial support, that the ANSF had been trained to depend on, were suddenly removed. Errors in US coalition training of the ANSF were seen as a factor, along with Afghan police extorting locals, military officers funding themselves by inventing ghost soldiers and the months of unpaid ANSF salaries that followed the April 2021 switch in ANSF salary management to Afghan military administration. Cronyism in ANSF military appointments and president Ashraf Ghani's inability to create an effective national consensus and convince local warlords were also seen as key processes of the ANSF's defeat. Afghans are also more loyal towards their traditional ethnic, tribal and even familial ties than they are to a central government in Kabul, which the provincial Taliban commanders exploited to negotiate surrender of many troops. In the long-term, the American invasion of Iraq and its shifting in focus to that region has also been cited as a reason for the Taliban's resurgence in the mid to late 2000s.

Background

In September 2020, over 5,000 Taliban prisoners, including 400 accused or convicted of major crimes such as murder, were released by the Afghan government as part of the United States–Taliban deal between the United States and the Taliban. According to Afghanistan's National Security Council, many of the released prisoners who were "experts" returned to the battlefield and strengthened the Taliban's hand. Also by the time of Taliban's final offensive, most of the Afghan provincial governors had cut deals with the militants to switch sides and join the Taliban. A senior Afghan Interior Ministry official, quoted by the Washington Post, said that Taliban have recruitment teams that reach out to Afghan officials and push them to join the Taliban. He says that Afghan government suspects that a long list of governors might have Taliban ties.

The Taliban also enjoyed substantial support by various other armed militant groups, especially al-Qaeda and its associates like Jamaat Ansarullah. Militants of al-Qaeda in the Indian Subcontinent (AQIS) reportedly fought alongside the Taliban in the 2021 offensive. In the south and east, various Pakistani militant groups supported the Taliban offensive including Tehrik-i-Taliban Pakistan (which had about 5,000 fighters in Afghanistan), Harkat-ul-Mujahideen, Lashkar-e-Taiba, and Jaish-e-Mohammed.

Offensive Initial advances In May, the Taliban captured 15 districts from the Afghan government, including Nirkh and Jalrez Districts in Maidan Wardak Province. Among the locations captured was the Dahla Dam in Kandahar Province, Afghanistan's second largest dam. During the month, 405 Afghan National Security Force (ANSF) troops and 260 civilians were killed in clashes, while the Afghan Ministry of Defense claimed to have killed 2,146 Taliban fighters including a Taliban divisional commander, Qari Jabar. By the end of May, Portugal, Slovenia, Spain, and Sweden had completely withdrawn their forces from Afghanistan.

In June, the Taliban captured 69 districts from the Afghan government. They entered the cities of Kunduz and Puli Khumri and besieged Mazar-i-Sharif. Among the locations they captured was Afghanistan's main border crossing with Tajikistan and the Saydabad District in Maidan Wardak Province, which is called the gateway to Afghanistan's capital city, Kabul. They captured 700 trucks and Humvees from the Afghan security forces, and dozens of armored vehicles, Boeing Insitu ScanEagle drones and artillery systems.

An Afghan Air Force Mil Mi-17 was shot down by the Taliban, killing three pilots, while a UH-60 Black Hawk was damaged on the ground after an outpost belonging to the Afghan Armed Forces was shelled by the Taliban in the same month. On 16 June, Taliban fighters executed 22 surrendering Afghan Army commandoes in the town of Dawlat Abad. Among the dead was Major Sohrab Azimi, son of retired General Zahir Azimi. He was posthumously promoted to brigadier general. Eyewitnesses said that the language the Taliban fighters spoke among themselves was foreign, indicating that the fighters were not from the area. During the month, 703 Afghan National Security Forces and 208 civilians were killed in clashes, while the Ministry of Defense claimed to have killed 1,535 Taliban fighters. On 19 June, President Ashraf Ghani replaced the Afghan National Army chief of staff, and the defense and interior ministers. By the end of June, all Resolute Support Mission's member countries had withdrawn their troops, except for the UK, Turkey, and the US.

On 22 June, the Taliban captured Sher Khan Bandar, Afghanistan's main Tajikistan border crossing, and 13 districts fell to them within 24 hours. On the same day, there was heavy fighting in Baghlan Province when Afghan forces launched an operation on the outskirts of Pul-e-Khumri, the provincial capital, killing 17 Taliban fighters, including Qari Khalid, a Taliban divisional commander. Simultaneously, Taliban forces took control of Balkh and encircled Mazar-i-Sharif, the capital of Balkh Province. On 23 June, Taliban and Afghan forces clashed inside Pul-e Khumri.

On 25 June, the Taliban took control of the Shinwari District and the Ghorband District in Parwan Province, north of Kabul. That same day NBC News reported that the Taliban "were surprised at the speed of their advance and had avoided capturing some targets so as not to run afoul of the US", and the Afghan government launched a program called National Mobilization that aimed to arm militia groups to fight the Taliban. Meanwhile, Taliban deputy emir Sirajuddin Haqqani issued a series of instructions on Voice of Jihad for the governance of territories seized in the offensive. FDD's Long War Journal researcher Thomas Joscelyn argued that Haqqani's statements "read like those that would be issued by the head of a nation".

On 27 June, Chaki Wardak District and Saydabad District fell to the Taliban after at least 50 Afghan troops surrendered and were captured by the Taliban. On the same day Rustaq District, Shortepa District and the Arghistan District fell to the Taliban. ToloNews reported that 108 districts fell to the Taliban in the last two months and the Afghan army had retaken only 10. On 29 June, the Taliban launched an offensive on Ghazni, causing violent clashes within the city.

Escalation Frontiers and major border crossings captured by the Taliban Frontier Province Country Date captured Sher Khan Bandar Kunduz 22 June IshkashimBadakhshan 5 July Wakhjir Pass 8 July Islam Qala Herat9 July Abu Nasr Farahi Farah Torghundi Herat Spin Boldak Kandahar 14 July Zaranj Nimruz 6 August Aqina Faryab 14 August Torkham Nangarhar 15 August Hairatan Balkh Ghulam Khan Khost 16 August In July, the Taliban captured 64 districts from the Afghan government and entered the second and third largest cities of Afghanistan, Kandahar and Herat respectively. During the month, 335 Afghan National Security Forces and 189 civilians were killed during the clashes with the Taliban, while the Ministry of Defense claimed to have killed 3,159 Taliban fighters. Around 1,500 Afghan soldiers deserted into Tajikistan, according to its Collective Security Treaty Organization (CSTO) envoy. Iranian media reported that around 300 Afghan soldiers and civilians had crossed the border and entered Iran to escape the Taliban.

On 2 July, Germany and Italy withdrew their troops from Afghanistan, and US troops left Bagram Airfield, handing it to the Afghan Armed Forces. Subsequent US airstrikes against the Taliban were led from the Al Udeid Air Base in Qatar and the US Navy carrier strike group in the Persian Gulf, requiring the warplanes to travel several hours to reach their targets. According to a US defence official, these airstrikes amounted to only "a handful" each day.

On the first weekend of July, hundreds of armed women took to the streets of northern and central Afghanistan in demonstrations against the Taliban offensive, the largest one taking place in Chaghcharan, the capital of Ghor Province. The provincial governor Abdulzahir Faizzada reported in an interview with The Guardian that many Afghan women, some of whom recently escaped the Taliban, have been learning to use firearms in order to defend themselves, with some having already battled the Taliban. Taliban spokesperson Zabiullah Mujahid denounced the reports as "propaganda" and declared that "women will never pick up guns against us". During the weekend, the Taliban captured nine border posts belonging to the Afghan Army in Kunar Province near the border with Pakistan, during which 39 personnel of the Afghan Army surrendered to the Taliban while another 31 fled to Pakistan.

On 5 July, Tajik President Emomali Rahmon announced the deployment of 20,000 troops on the Afghanistan–Tajikistan border, to prevent a spillover of the war into Tajikistan. On 9 July, the Collective Security Treaty Organization announced that the Russian Federation would deploy 7,000 troops on the border as well, to aid Tajikistan. On 7 July, pro-government forces defeated a Taliban attempt to capture the city of Qala e Naw. On 8 July, the Taliban captured the strategically important Karukh District in Herat Province.

On 8 July, Abubaker Muradi, deputy head of National Directorate of Security (NDS), and Khir Mohammad Arefi, a commander of a territorial army, along with dozens of other security personnel surrendered to the Taliban without a fight. Khan Jan Zafar and Mohammad Farid Akhizai, two members of the provincial council, also surrendered to the Taliban on the same day.