Timeline: Key dates in Afghanistan since 2001
With the Taliban back in control of Afghanistan, here is a recap of landmark events in the war-torn country since the group's first regime was toppled in the 2001 US-led invasion.
2001: 9/11 and 'War on Terror'
President George W Bush launched his "war on terror" in response to the 11 September attacks that killed around 3,000 people, with air strikes on Afghanistan on 7 October, 2001.
The Taliban government had sheltered Osama bin Laden and his Al-Qaeda movement, which masterminded 9/11.
In power since 1996, the Taliban were soon defeated and fled the Afghan capital Kabul on 6 December.
Hamid Karzai was appointed to lead an interim government and NATO began to deploy its International Security Assistance Force.
2004: First presidential election
Afghanistan's first election under a new system was held on 9 October, 2004 with an enthusiastic turnout of 70 per cent. Karzai won 55 per cent of the votes.
The Taliban regrouped in the south and east, as well as across the border in Pakistan, and launched an insurgency.
2008-2011: US reinforcements
As attacks multiplied, the US command in 2008 asks for more troops and the first reinforcements are sent.
Karzai was re-elected on 20 August, 2009 in elections that are marred by massive fraud, low turnout and Taliban attacks.
In 2009, president Barack Obama, who had campaigned on a pledge to end the Afghanistan war, doubled the number of US troops to 68,000. In 2010, it reached around 100,000.
Osama bin Laden was killed on 2 May, 2011 in a US special forces operation in Pakistan.
On 22 June, Obama announced the beginning of a troop withdrawal, with the departure by mid-2012 of 33,000 soldiers.
2014: NATO exit
In June 2014, Ashraf Ghani was elected president but voting was marred by violence and a bitter dispute over claims of fraud.
In December, NATO ended its 13-year combat mission but a number of troops remained to train the Afghan military.
The following year, the Taliban made their greatest military advances since being ousted.
The Islamic State jihadist group also became active in the region. Bloody attacks multiplied, notably in Kabul.
2020: US-Taliban deal, disputed election
Ghani was declared victorious for a second term on 18 February, 2020, an announcement rejected by his rival and former minister Abdullah Abdullah, who vows to form his own parallel government.
On 29 February, the United States and the Taliban signed a historic deal in Doha under which all foreign forces would leave Afghanistan by May 2021, provided the insurgents start talks with Kabul and adhere to other security guarantees.
A power-sharing deal ended the bitter Ghani-Abdullah feud in May. Abdullah took the role of leading the peace negotiations.
Talks began in September but violence surges and the Taliban are blamed for a wave of targeted killings.
May 2021: Foreign troops' withdrawal
On 1 May, 2021 the United States and NATO started withdrawing their 9,500 soldiers, of which 2,500 were American.
In May, the Americans withdrew from the Kandahar air base.
On 2 July, Bagram air base, Afghanistan's biggest, and the nerve centre of the US-led coalition's operations -- was handed over to Afghan forces.
President Joe Biden said that the US troop withdrawal will be completed by 31 August, before the 20th anniversary of the 9/11 attacks.
May-August 2021: Taliban blitz
The insurgents launched lightning attacks across Afghanistan, capturing vast stretches of the hinterland as the final foreign troops began their withdrawal.
The Taliban captured their first provincial capital, Zaranj in the southwest, on 6 August.
Other major cities fell within days, including Kandahar and Herat -- Afghanistan's second- and third-biggest cities respectively.
Most of the north, west and south were under Taliban control by 13 August.
The Pentagon says Kabul does not appear to face an "imminent threat".
August 2021: Fall of Kabul
The insurgents fully encircled the capital on 15 August with the capture of Jalalabad in the east.
It left Kabul as the only city under government control.
Diplomatic missions scrambled to evacuate officials and local staff who fear reprisals from the Taliban.
Ghani fled the country, reportedly to Tajikistan, and the Taliban enter Kabul, eventually taking position in the presidential palace.
In a statement, Ghani admitted the insurgents have "won".