The War in Afghanistan began on October 7, 2001, as the armed forces of the United States, the United Kingdom, Australia, and the Afghan United Front (Northern Alliance) launched Operation Enduring Freedom. The primary driver of the invasion was the September 11 attacks on the United States, with the stated goal of dismantling the al-Qaeda terrorist organization and ending its use of Afghanistan as a base. The United States also said that it would remove the Taliban regime from power and create a viable democratic state. More than a decade into the war, NATO forces continue to battle a widespread Taliban insurgency, and the war has expanded into the tribal area of neighboring Pakistan. The War in Afghanistan is also the United States' longest running war.
The preludes to the war were the assassination of the Northern Alliance leader Ahmad Shah Massoud on September 9, 2001, and the September 11 attacks in the United States, in which nearly 3,000 civilians were killed in New York City, Arlington, Virginia, and Shanksville, Pennsylvania. The United States identified members of al-Qaeda, an organization based in, operating out of, and allied with the Taliban's Islamic Emirate of Afghanistan, as the perpetrators of the attacks.
In the first phase of Operation Enduring Freedom, ground forces of the Afghan United Front working with teams of U.S. and British Special Forces and with U.S. air support, ousted the Taliban regime from power in Kabul and most of Afghanistan in a matter of weeks. Most of the senior Taliban leadership fled to neighboring Pakistan, some being flown out in the Kunduz airlift. The democratic Islamic Republic of Afghanistan was established and an interim government under Hamid Karzai was created which was also democratically elected by the Afghan people in the 2004 general elections. The International Security Assistance Force (ISAF) was established by the U.N. Security Council at the end of December 2001 to secure Kabul and the surrounding areas. This was after the US sought to make sure that it would not interfere with its on going counterterrorism initiatives in the country, changing the originally titled "International Security Force" to ISAF. NATO assumed control of ISAF in 2003. ISAF includes troops from 42 countries, with NATO members providing the core of the force. The stated aim of the invasion was to find Osama bin Laden and other high-ranking al-Qaeda members to be put on trial, to destroy the organization of al-Qaeda, and to remove the Taliban regime which supported and gave safe harbor to it. In 2003, Taliban forces started an insurgency campaign against the democratic Islamic Republic and the presence of ISAF-troops in Afghanistan. Their headquarters are alleged to be in or near Quetta, Pakistan. Since 2006, Afghanistan has experienced a dramatic increase in Taliban-led insurgent activity. Since the coalition intervention in 2001, more than 5.7 million refugees have returned to Afghanistan.