At the end of 2014, after more than 13 years of combat operations, 9,800 US troops were to remain in Afghanistan.
That number would be reduced by half at the end of 2015 and reduced again at the end of 2016 to a small military contingent attached to the US embassy.
But the Taliban's success on the battlefield and Afghan security forces' poor performance led to a continued US deployment in the country.
At the end of 2016 the US had a force of nearly 10,000 in Afghanistan, though President Barack Obama intended to reduce it to 5,500 in 2017, the Taliban threat caused a change of plans, and 8,400 troops are to remain in Afghanistan during 2017.
President Donald Trump, who has called for the US to pull out of Afghanistan, instead announced Monday that the US would deploy more troops to the war-torn country, coupled with efforts to get Pakistan to crack down on terrorist groups operating along its border with Afghanistan and to get countries in the region, like India, to provide more economic support.
The decision extends the US's nearly 16-year-long fight — longer than any other US foreign war and most other military operations — in Afghanistan.
Recent years have seen that fight settle into what Army Gen. John Nicholson, the top US commander in Afghanistan and the 12th person to hold that job, have called a stalemate — one in which the US is at a disadvantage, according to Defense Secretary James Mattis.
"We are not winning in Afghanistan right now. And we will correct this as soon as possible,"Mattis told the Senate Armed Services Committee in mid-June.
Nicholson said in the past that more US forces may be needed to counter growing outside influence in Afghanistan — from Russia in particular.
In 16 years of operations in and around Afghanistan, the US has lost some 2,200 troops and spent about $110 billion on Afghanistan's reconstruction, more than the cost of the Marshall Plan that reconstruct Europe after World War II.
Washington has allocated more than $60 billion since 2002 to train and equip Afghan troops.
The US money spent in Afghanistan has yielded few lasting results, however. Security in the country remains precarious, and at the end of 2016 the Taliban was thought to control more territory than at any time since 2001.
Below, you can see photos documenting the last 16 years the US's "generational" war in Afghanistan.
Osama bin Laden is seen at an undisclosed location in this television image broadcast Sunday, October 7, 2001. Bin Laden praised God for the September 11 terrorist attacks and swore America "will never dream of security" until "the infidel's armies leave the land of Muhammad," in a videotaped statement aired after the strike launched Sunday by the US and Britain in Afghanistan.
The US and Britain on October 7, 2001, launched a first wave of air strikes against Afghanistan and then US President George W. Bush said the action heralded a "sustained, comprehensive and relentless" campaign against terrorism.
Eyewitnesses said they saw flashes and heard explosions over the Afghan capital of Kabul in the first phase of what the US has said will be a protracted and wide-ranging war against terrorism and the states that support it. The attack had been prepared since the September 11 suicide attacks on the US.
Mohammed Anwar, left, and an unidentified boy in Kabul, Afghanistan, display pieces of shrapnel from bombs dropped Monday morning, October 8, 2001.
The US and Britain hit Afghanistan and key installations of the Taliban regime with cruise missiles Sunday night for harboring suspected terrorist Osama bin Laden. Many residents of Afghanistan seem unfazed by the bombing after living in war like conditions for more than 20 years.
See the rest of the story at Business Insider