Some 2,400 US troops have been killed since the US invaded Afghanistan in 2001 to pursue the Taliban.

As the United States and the Taliban edged closer to reaching an agreement in a bid to bring peace in Afghanistan, the group’s fighters launched a series of attacks across the country including in the capital, Kabul.

At least 100 people were killed last week in the Taliban-claimed attacks, including a US soldier, which brought the number of US troops killed this year in Afghanistan to 16. A Romanian soldier was also killed.

Amid the attacks, the US envoy negotiating with the Taliban, Zalmay Khalilzad, said his team had reached an agreement “in principle” with the Taliban.

The draft agreement concerned the US pulling troops from five bases in Afghanistan in exchange for the group not allowing foreign fighters to use Afghanistan as a launchpad for global attacks. About 14,000 US troops and some 17,000 from 39 NATO allies and partner states are in the country in a non-combative role.

But on Sunday, US President Donald Trump announced in a series of tweets that he had “called off” the peace negotiations and “cancelled” a secret meeting with the Taliban’s “major leaders” that was planned for Sunday at a presidential compound in Camp David, Maryland. Trump said he had also planned to meet Afghanistan’s president.

Here is a timeline of the foreign military presence in Afghanistan since the US-led invasion of 2001 that toppled the Taliban. The war between the Taliban and the US has been raging since, with some 2,400 US troops and tens of thousands of Afghan troops killed.

The conflict has also claimed the lives of over 50,000 Afghan civilians.

October 2001: Al-Qaeda fighters are blamed for the September 11 attacks in the US and then-President George W Bush announces that the US and UK had launched air attacks on Afghanistan for harbouring the armed group.

November 2001: Some 1,300 US troops arrive in Afghanistan

December 2001: The US force grows to 2,500 and the Taliban, in power since 1996, is toppled. An interim administration is established and Pashtun leader Hamid Karzai becomes its chairman.

March 2002: The number of US troops in Afghanistan increases to 7,200.

December 2002: The total number of US troops in Afghanistan reaches 9,700 as the year ends.

April 2004: The number swells to 20,300 as the US builds up forces along the Afghanistan-Pakistan border and provides security for fledgeling reconstruction projects.

December 2006: Attention shifts to the escalating war in Iraq; the force in Afghanistan remains just over 20,000.

December 2007: The force in Afghanistan rises to 25,000, but Iraq remains Washington’s priority.

May 2009: As fighting in Afghanistan becomes more intense, the number of US troops surpasses 50,000.

December 2009: Troops numbered more than 67,000 and the situation was deteriorating, with escalating violence and more service members killed. Then-US President Barack Obama orders in another 33,000 troops to battle al-Qaeda fighters and a resurgent Taliban.

August 2010: US forces in Afghanistan reach 100,000.

US troops’ gradual dropdown

May 2011: Al-Qaeda leader Osama Bin Laden is found hiding in neighbouring Pakistan and killed in a US special operations raid. There are still about 100,000 troops in Afghanistan.

June 2011: Saying the US is meeting its goals in Afghanistan, Obama announces his withdrawal plan: Bring back 10,000 troops by the end of 2011 and continue at a steady pace until handing over security responsibilities to the Afghans by 2014.

September 2012: Troop levels down to 77,000.

December 2013: Down to 46,000 troops, the slow withdrawal continues.

March 2014: With nearly 34,000 troops in Afghanistan, Obama orders the Pentagon to develop options for a complete military withdrawal because Karzai refuses to sign a security agreement with the US.

May 2014: Obama announces his plan to pull virtually all US troops out of Afghanistan by the end of 2016 when his second term in office will be drawing to a close.

December 2014: Troop levels were cut in half since Obama’s announcement in May, down to 16,100. Obama declares their combat mission over but says troops will continue training and advising Afghan forces.

March 2015: Troops decline to their current number – about 9,800 – on track for a nearly total withdrawal in 2016.

October 2015: In a reversal, Obama says the situation is too fragile for the US military to leave. He announces plans to keep the force of about 9,800 in place through most of 2016 to continue counterterrorism missions and advise Afghans battling the Taliban. The plan is for the number to decrease to about 5,500 troops by December 2016.

July 2016: Saying the security situation in Afghanistan “remains precarious”, Obama announces that instead of dropping the US troop level to 5,500, he will keep it at about 8,400 through the end of his term in January 2017 and that his successor can determine the next move.

August 2017: Trump warns against a “hasty withdrawal” from Afghanistan, saying: “Conditions on the ground, not arbitrary timetables, will guide our strategy from now on.” Weeks later, it is confirmed that additional troops will be deployed, eventually bringing the number to about 14,000.

September 2019: Khalilzad, the US envoy, announces that under a deal reached “in principle” with the group, the first 5,000 US troops would withdraw within 135 days of the agreement becoming final.

September 2019: Trump says secret meetings between himself and Taliban leaders and with the Afghan president at Camp David are now cancelled, citing the death of a US service member in a Taliban attack in Kabul two days earlier.