<human>:  Why did the US invade Afghanistan?
<bot>: The US invaded Afghanistan in 2001 after the terrorist attacks of September 11th. In the wake of the attacks, the United States launched a military operation against al-Qaeda and the Taliban government of Afghanistan, which had harbored the terrorists responsible for the attacks. The US military intervention was officially justified as a response to the September 11th attacks, but it also included the goal of removing the Taliban regime and preventing it from ever again providing a safe haven for international terrorists.