U.S. invasion of Afghanistan: Operation Anaconda begins, (ending on March 19 after killing 500 Taliban and al-Qaeda fighters, with 11 Western troop fatalities).

Operation Anaconda was a military operation that took place in early March 2002 as part of the War in Afghanistan. CIA paramilitary officers, working with their allies, attempted to destroy al-Qaeda and Taliban forces. The operation took place in the Shahi-Kot Valley and Arma Mountains southeast of Zormat. This operation was the first large-scale battle in the post-2001 War in Afghanistan since the Battle of Tora Bora in December 2001. This was the first operation in the Afghanistan theater to involve a large number of U.S. forces participating in direct combat activities.

Between March 2 and March 16, 2002 1,700 airlifted U.S. troops and 1,000 pro-government Afghan militia battled between 300 and 1,000 al-Qaeda and Taliban fighters to obtain control of the valley. The Taliban and al-Qaeda forces fired mortars and heavy machine guns from entrenched positions in the caves and ridges of the mountainous terrain at U.S. forces attempting to secure the area. Afghan Taliban commander Maulavi Saif-ur-Rehman Mansoor later led Taliban reinforcements to join the battle. U.S. forces had estimated the strength of the rebels in the Shahi-Kot Valley at 150 to 200, but later information suggested the actual strength was of 500 to 1,000 fighters. The U.S. forces estimated they had killed at least 500 fighters over the duration of the battle, however journalists later noted that only 23 bodies were found and critics suggested that after a couple days, the operation "was more driven by media obsession, than military necessity".

The War in Afghanistan was a conflict that took place from 2001 to 2021 in the South-Central Asian country of Afghanistan. It began when the United States and its allies invaded Afghanistan and toppled the Taliban-ruled Islamic Emirate. The war ended with the Taliban regaining power after a 19 years and 10 months-long insurgency against allied NATO and Afghan Armed Forces. It was the longest war in United States history, surpassing the Vietnam War (1955–1975) by approximately five months.

Following the September 11 attacks in 2001, then-US President George W. Bush demanded that the Taliban, then-de facto ruling Afghanistan, extradite Osama bin Laden, the mastermind of the attacks and who was, until then, freely operating within the country. The Taliban's refusal to do so led to the invasion of the country; the Taliban and their al-Qaeda allies were mostly defeated and expelled from major population centers by US-led forces and the Northern Alliance. Despite failing to find bin Laden after his escape to Pakistan, the US and a coalition of over 40 countries (including all NATO members) remained in the country and formed a UN sanctioned security mission called International Security Assistance Force (ISAF) to consolidate a new democratic authority in the country and prevent the return of the Taliban and al-Qaeda to power. At the Bonn Conference, new Afghan interim authorities (mostly from the Northern Alliance) elected Hamid Karzai to head the Afghan Interim Administration. A rebuilding effort across the country was also made following the expulsion of the Taliban.

The Taliban reorganized under Mullah Omar and in 2003 launched an insurgency against the new Afghan government. Insurgents from the Taliban and other groups waged asymmetric warfare with guerrilla raids and ambushes in the countryside, suicide attacks against urban targets, turncoat killings against coalition forces and reprisals against perceived collaborators. Violence eventually escalated to a point where large parts of Afghanistan had been retaken by the Taliban by 2007. ISAF responded by massively increasing troops for counter-insurgency operations to "clear and hold" villages, reaching its peak in 2011 when roughly 140,000 foreign troops operated under ISAF and US command in Afghanistan.Following the killing of Osama bin Laden in 2011 (the original casus belli), leaders of the NATO alliance commenced an exit strategy for withdrawing their forces. On 28 December 2014, NATO formally ended ISAF combat operations in Afghanistan and officially transferred full security responsibility to the Afghan government. Unable to eliminate the Taliban through military means, coalition forces and separately the government of president Ashraf Ghani turned to diplomacy to end the conflict. These efforts culminated in February 2020, when the United States and the Taliban signed a conditional peace deal in Doha which required that US troops withdraw by April 2021. The Taliban, in return, pledged to prevent any group in the territory of Afghanistan from attacking the US and its allies in the future. The Afghan government of that time was not a party to the deal and rejected its terms regarding release of prisoners.The target US withdrawal date was extended to 31 August. The Taliban, after the original deadline had expired, and coinciding with the troop withdrawal, launched a broad offensive throughout the summer in which they captured most of Afghanistan, finally taking Kabul on 15 August 2021. The same day, the president of Afghanistan Ashraf Ghani fled the country; the Taliban declared victory and the war ended. The reestablishment of Taliban rule was confirmed by the United States and on 30 August the last American military plane departed Afghanistan, ending almost 20 years of western military presence in the country.According to the Costs of War Project, the war killed 176,000 people in Afghanistan; 46,319 civilians, 69,095 military and police and at least 52,893 opposition fighters. According to the UN, after the 2001 invasion, more than 5.7 million former refugees returned to Afghanistan. However, in August 2021 when the Taliban took power, 2.6 million Afghans remained refugees, mostly in Pakistan and Iran, and another 4 million Afghans remained internally displaced persons within the country.