The last US troops flew out of Afghanistan, fulfilling President Joe Biden's pledge to bring an end to America's longest war after a chaotic and violent evacuation from Kabul, the US military said on Monday.

The following is a chronology of US involvement and major developments in Afghanistan over the past two decades:

11 September 2001: US involvement in Afghanistan is triggered by attacks on the United States plotted in Afghanistan by the al-Qaeda militant group, led by Osama bin Laden, who was in Afghanistan under Taliban protection.

7 October 2001: US forces begin air campaign with strikes on Taliban and al-Qaeda forces. Small numbers of US special forces and CIA agents soon slip into Afghanistan to help direct the bombing campaign and organise Afghan opposition forces. The Taliban would swiftly be toppled, however, with no major US combat deployment on the ground.

13 November 2001: US-backed Northern Alliance forces enter Kabul as the Taliban withdraw south. Within a month, Taliban leaders have fled from southern Afghanistan into Pakistan.

December 2001: US forces bomb the Tora Bora cave complex in eastern Afghanistan where bin Laden is reported to be hiding, but he slips over the border into Pakistan, where he disappears.

2 May, 2003: US officials declare an end to major combat operations in Afghanistan. Under President George W Bush, the US focus turns to preparing for the invasion of Iraq, which required a diversion of US troops, equipment, and intelligence collection from Afghanistan. That allows the Taliban to slowly regroup, at first in the south and east.

2006-2008: With US forces mainly fighting a surge campaign in Iraq, only a much smaller contingent is deployed in Afghanistan. The Taliban launch major advances threatening to recapture swaths of territory, especially in the south. In response, an enlarged NATO mission brings thousands more troops, notably British forces, hundreds of whom are killed in intense battles against the Taliban in Helmand province.

17 February 2009: As Washington draws down in Iraq, newly inaugurated President Barack Obama decides to ramp up the force in Afghanistan. In his first major military decision as commander in chief, he orders in 17,000 more combat troops to reinforce 38,000 US troops and 32,000 from some 40 NATO allies already on the ground. Later that year, with generals recommending a "surge" campaign similar to the one waged in Iraq in 2006-2007, Obama would order an even larger buildup. The US contingent would exceed 100,000 by the middle of 2010, carrying out extensive counter-insurgency operations across the country.

1 May 2011 - Bin Laden is killed in a raid by US forces in Pakistan.

December 2011: US officials say US diplomats have held about half a dozen secret meetings with Afghan Taliban contacts over the previous 10 months, mostly in Germany and Qatar.

27 May 2014: Following the surge campaign of Obama's first term, Washington rapidly draws down its forces and switches its emphasis to training and supporting the Afghan military. Obama outlines a plan to withdraw all but 9,800 American troops by the end of the year and pull out the rest by the end of 2016.

28 December 2014: The US combat mission is officially concluded after the withdrawal of most combat troops and a transition to an "Afghan-led" war.

21 August 2017: US President Donald Trump announces his strategy, calling for a small, open-ended deployment of US forces providing support to Afghans, with the goal of forcing the Taliban to negotiate peace with the Kabul government.

29 February 2020: Under Trump, Washington signs an agreement with the Taliban in Doha to withdraw all US troops. The Taliban agree to halt attacks on US forces, not to let their territory be used for terrorism and to hold talks with the Afghan government, although those talks would subsequently prove fruitless.

14 April 2021: Biden announces US forces will withdraw unconditionally by 11 September, implementing the agreement reached with the Taliban by his predecessor, Trump.

2 July 2021: US troops abruptly pull out of their main base at Bagram airfield 60km north of Kabul.

15 August 2021: After a stunning week-long advance capturing cities across the country, the Taliban seize Kabul without a fight. President Ashraf Ghani flees the country. The United States and Western allies launch an urgent airlift from Kabul airport to bring out their own citizens and tens of thousands of Afghans who aided them.

26 August 2021: Islamic State launches a suicide bomb attack on the crowded gates of Kabul airport, killing scores of civilians and 13 US troops, the deadliest incident for US forces in Afghanistan in more than a decade.

30 August 2021: US General Frank McKenzie, head of US Central Command, announces completion of the US troop withdrawal.