US President Barack Obama announced Thursday that thousands of US troops will remain in Afghanistan at least through 2017, due to the fragile security conditions there.
Here are developments in the US presence in Afghanistan after it intervened in 2001 following the September 11 attacks.
On October 7, 2001, less than a month after the September 11 attacks, US president George W. Bush launches operation "Enduring Freedom" in Afghanistan, after the Taliban refuse to hand over Al-Qaeda chief Osama bin Laden.
In a matter of weeks the US-led western coalition forces overthrow the Taliban, in power since 1996.
Apart from air strikes, the US backs the Afghan Northern Alliance with paramilitary teams from the CIA and special forces.
Some 1,000 American soldiers are deployed on the ground in November, rising to 10,000 the year after.
Attention is diverted from Afghanistan as US forces mount an invasion of Iraq, which becomes the main US concern.
The Taliban and other Islamist groups regroup in their strongholds in the south and east of the country, from where they can easily travel to and from Pakistani tribal zones.
In 2003, NATO takes control of the International Security Assistance Force ISAF. But most US forces remain under a separate command until 2006-2007 when they are folded into the NATO-led command headed by an American general.
Some 24,000 American soldiers are based in Afghanistan by the end of 2007, according to US Defense Department figures.
The Taliban insurgency spreads and the Bush administration comes under growing criticism for having neglected the situation in Afghanistan.
The American command on the ground calls for manpower to carry out an effective strategy against the insurgency. Bush agrees to send additional soldiers and by mid-2008 there were 48,500 US troops on the ground, according to Defense Department figures.
In the first months of the presidency of Barack Obama -- elected on campaign promises to end the two wars in Iraq and Afghanistan -- surges the number of American soldiers in Afghanistan to around 68,000.
In December, Obama, who has described the intervention as a "just war", raises the strength of US forces in Afghanistan to around 100,000, compared to nearly 50,000 allied soldiers.
The objective is to put brakes on the Taliban, to strengthen Afghan institutions and train Afghan forces.
The strategy goes hand in hand with a date for beginning the withdrawal in July 2011.
Al-Qaeda leader Osama Bin Laden, mastermind of the 9/11 attacks that started the war, is killed on May 2, during an operation by US special forces in Pakistan.
On June 22, Obama announces the start of the military withdrawal with 33,000 soldiers due to leave by mid-2012. A first contingent leaves Afghanistan in July 2011.
The complete transition to responsibility for security to the Afghan forces is planned for the end of 2014.
In early May, Obama and his Afghan counterpart Hamid Karzai sign a long-term strategic partnership enshrining relations between the two countries after the combat mission ends in 2014.
Under the accord, the 130,000 troops of the international coalition, of which two thirds are Americans, must transfer whole responsibility for security to Kabul by the end of 2014.
In late May, Obama says that the American military presence will be reduced by half by the end of 2015.
On September 20, after more than a year of bargaining, Afghanistan signs a bilateral security accord with the US and a similar text with NATO: 12,500 foreign soldiers, of which 9,800 are Americans, will remain in the country in 2015, after the end of the NATO combat mission.
From the beginning of 2015, American troops will be charged with two missions: anti-terrorist operations against Al-Qaeda and the training of Afghan forces.
In March, Obama announces that the rate of the withdrawal of US troops will be slowed down.
On October 15, Obama announces thousands of US troops will remain in Afghanistan past 2016, admitting Afghan forces are not ready to stand alone.