Shortly after the September 11 attacks in 2001, the United States declared the war on terror and subsequently led a multinational military operation against Taliban-ruled Afghanistan. The stated goal was to dismantle al-Qaeda, which had executed the attacks under the leadership of Osama bin Laden, and to deny Islamist militants a safe base of operations in Afghanistan by toppling the ruling Taliban government. The United Kingdom was a key ally of the United States, offering support for military action from the start of the invasion preparations. The American military presence in Afghanistan greatly bolstered the Northern Alliance, which had been locked in a losing fight with the Taliban during the Afghan Civil War. Prior to the beginning of the United States' war effort, the Taliban had seized around 85% of Afghanistan's territory as well as the capital city of Kabul, effectively confining the Northern Alliance to Badakhshan Province and smaller surrounding areas. The American-led invasion on 7 October 2001, marked the first phase of what would become the 20-year-long War in Afghanistan.
After the September 11 attacks, American president George W. Bush demanded that the Taliban government extradite Osama bin Laden to the United States and also expel al-Qaeda militants from Afghanistan; bin Laden had been active in Afghanistan since the Soviet–Afghan War and was already wanted by the Federal Bureau of Investigation for his role in the 1998 United States embassy bombings. The Taliban declined to extradite bin Laden and further ignored demands to shut down terrorist bases or extradite other suspected terrorists. In response, the United States launched Operation Enduring Freedom on 7 October 2001, alongside the United Kingdom. The two countries were later joined by a large multinational force, including Afghanistan's local Northern Alliance. The invasion effort made rapid progress for the next two months as the coalition captured Kabul on 13 November and toppled the Taliban by 17 December, after which international military bases were set up near major cities across the country. However, most members of al-Qaeda and the Taliban were not captured: during the Battle of Tora Bora, several fighters including bin Laden, the founder of al-Qaeda escaped into neighboring Pakistan or otherwise retreated to remote regions deep within the Hindu Kush.