The War in Afghanistan refers to the intervention by North Atlantic Treaty Organisation (NATO) and allied forces in the Afghan civil war. The war followed the September 11 attacks, and its public aims were to dismantle al-Qaeda and denying it a safe basis of operation in Afghanistan by removing the Taliban from power. On 28 December 2014 NATO formally ended combat operations in Afghanistan and transferred full security responsibility to the Afghan government via a ceremony in Kabul.
U.S. President George W. Bush demanded that the Taliban hand over Osama bin Laden and expel al-Qaeda. The Taliban asked bin Laden to leave the country, but declined to extradite him without evidence of his involvement in the 9/11 attacks. The United States refused to negotiate and launched Operation Enduring Freedom on 7 October 2001 with the United Kingdom. The two were later joined by other forces, including the Northern Alliance. The U.S. and its allies drove the Taliban from power and built military bases near major cities across the country. Most al-Qaeda and Taliban were not captured, escaping to neighboring Pakistan or retreating to rural or remote mountainous regions.
In December 2001, the United Nations Security Council established the International Security Assistance Force (ISAF), to oversee military operations in the country and train Afghan National Security Forces. At the Bonn Conference in December 2001, Hamid Karzai was selected to head the Afghan Interim Administration, which after a 2002 loya jirga in Kabul became the Afghan Transitional Administration. In the popular elections of 2004, Karzai was elected president of the country, now named the Islamic Republic of Afghanistan.
In 2003, NATO assumed leadership of ISAF, with troops from 43 countries. NATO members provided the core of the force. One portion of U.S. forces in Afghanistan operated under NATO command; the rest remained under direct U.S. command. Taliban leader Mullah Omar reorganized the movement and in 2003 launched an insurgency against the government and ISAF.
Though vastly outgunned and outnumbered, the Taliban insurgents, most notably the Haqqani Network and Hezb-e-Islami Gulbuddin, have waged asymmetric warfare with guerilla raids and ambushes in the countryside, suicide attacks against urban targets and turncoat killings against coalition forces. The Taliban exploited weaknesses in the Afghan government, among the most corrupt in the world, to reassert influence across rural areas of southern and eastern Afghanistan. ISAF responded in 2006 by increasing troops for counterinsurgency operations to "clear and hold" villages and "nation building" projects to "win hearts and minds".
While ISAF continued to battle the Taliban insurgency, fighting crossed into neighboring North-West Pakistan. In 2004, the Pakistani Army began to clash with local tribes hosting al-Qaeda and Taliban militants. The US military launched drone attacks in Pakistan to kill insurgent leaders. This resulted in the start of an insurgency in Waziristan in 2007.
On 2 May 2011, United States Navy SEALs killed Osama bin Laden in Abbotabad, Pakistan. In May 2012, NATO leaders endorsed an exit strategy for withdrawing their forces. UN-backed peace talks have since taken place between the Afghan government and the Taliban. In May 2014, the United States announced that its combat operations would end in 2014, leaving just a small residual force in the country until the end of 2016.
As of 2013, tens of thousands of people had been killed in the war. Over 4,000 ISAF soldiers and civilian contractors as well as over 10,000 Afghan National Security Forces had been killed. In October 2014 British forces handed over the last bases in Helmand to the Afghan military, officially ending their combat operations in the war.