In response to the 9/11 attacks, the U.S. partnered with the Northern Alliance, a rebel group that had been fighting the Taliban for years.
The Afghan war began with a massive bombing campaign helped by CIA and Special Forces on the ground, who ultimately drove the Taliban from their last stronghold in Kandahar two months later.
Many militants were captured in the initial stages of the war, and they were later sent to the newly-opened Guantanamo Bay detention facility in Cuba.
Some captured "militants" were innocents turned over to get CIA reward money. "They knew Americans were looking for Arabs, so they captured Arabs and sold them — just like someone catches a fish and sells it," a detainee told AP.
next slide will load in 15 secondsSkip AdSkip AdMany Afghans rejoiced at the Taliban's ouster, as the group had imposed strict Shariah law that allowed people few rights, especially women.
The US drove out the Taliban government, but many Al Qaeda and Taliban militants, including Osama bin Laden, were able to escape and make their way into Pakistan.
While officially out of power, a Taliban "shadow government" still operated in many villages.
And Taliban militants who were easily identified at the beginning of the war became obscured amidst the local populace. For Marines like this one here, a blinding sandstorm could be a metaphor for trying to find enemy fighters.
On Jan. 4, 2002, Sgt. 1st Class Nathan Chapman was killed in action. He was the first American service member to die in the Afghan war, but he would not be the last.
next slide will load in 15 secondsSkip AdSkip AdIn the 13 years since, over 3,400 more U.S. troops would give their lives.
And more than 20,000 would come home with injuries.
Many civilians also experienced the horrors of war, as a Brown University study estimated more than 21,000 Afghan civilian deaths.
U.S. Defense Secretary Donald Rumsfeld declared an "end to major combat" in May 2003, but the war would drag on for many more years.
Hamid Karzai, named interim leader in Dec. 2001, would be elected president in Oct. 2004.
next slide will load in 15 secondsSkip AdSkip AdBut Karzai's election did not mean an end to combat and a growing Taliban insurgency.
With the U.S. waging war on two fronts — after the invasion of Iraq in March 2003 — troops in both countries encountered increasingly deadly improvised explosive devices.
Osama bin Laden was long gone as U.S. troops continued the war, but the Al Qaeda leader appeared in a video message just four days before the 2004 US Presidential election to take credit for 9/11.
And Afghanistan's stubborn insurgency continued to attack troops, who could regroup, train, and recruit from Pakistan's lawless tribal areas on the border.
But it wasn't always combat. Much of NATO's effort centered on "winning hearts and minds," which often happened over tea with Afghan tribal leaders.
next slide will load in 15 secondsSkip AdSkip AdAnd NATO troops rebuilt and trained the Afghan National Army and also outfitted them with weapons and vehicles.
But quite often, ANA troops would need NATO artillery and air support if they came under attack.
These types of strikes also came with a terrible cost: Scores of civilians were killed, especially from air-dropped bombs.
One particularly deadly attack occurred in 2009, with a U.S. airstrike killing at least 140 people, many of whom were children.
The bombing drew widespread condemnation and protests in the country.
next slide will load in 15 secondsSkip AdSkip AdUnder the command of Gen. Stanley McChrystal, the rules of engagement for such strikes was sharply restricted in 2009.
A move which some critics say cost American lives. “We handcuffed our troops in combat needlessly,” retired Air Force Lt. Gen. Thomas McInerney told Washington Times.
With a deadline already set for withdrawal this year, the "combat mission" for NATO forces will end as many troops leave. But the future of Afghanistan is far from certain.
You've seen the history of the Afghan war ...