<human>:  Why did the US invade Afghanistan?
<bot>: The US invaded Afghanistan because it was a safe haven for Al Qaeda and Taliban fighters. In 2001, Al Qaeda carried out the 9/11 attacks on the United States. Al Qaeda and the Taliban were allied with each other, and they had been fighting against the US for years. The US invaded Afghanistan to remove Al Qaeda and the Taliban from power and to stop their terrorist attacks.