The United States launched airstrikes against Taliban and al-Qaeda targets in Afghanistan on October 7, 2001, in response to the September 11 attacks. The attacks marked the beginning of the US-led War on Terror. The US quickly succeeded in toppling the Taliban regime, but the war dragged on for years as the US and its allies struggled to pacify the country and eliminate the threat from al-Qaeda and other terrorist groups. The US finally withdrew its troops from Afghanistan in 2021, after 20 years of war.