As the United States and the Taliban ready to sign a deal aimed at eventually getting America out of Afghanistan, here are some landmark events in the two-decade conflict.
2001: 'War on terror'
President George W. Bush launches his "war on terror", a response to the September 11 attacks that killed around 3,000 people in New York, Washington and Pennsylvania with airstrikes on Afghanistan on October 7, 2001.
The Taliban government had sheltered Osama bin Laden and his Al-Qaeda movement, which masterminded the strikes.
In power since 1996, the Taliban are soon defeated and flee the capital on December 6.
Hamid Karzai is appointed to lead an interim government and NATO begins to deploy its International Security Assistance Force (ISAF).
(Photograph:Zee News Network)
2004: First presidential election
Afghanistan's first election based on universal suffrage is held on October 9, 2004 and Karzai wins 55 percent of votes on an enthusiastic turnout of 70 percent.
The Taliban regroup in the south and east, and also across the border in Pakistan, and launch an insurgency.
2008: US reinforcements
As the attacks multiply, the US command in September 2008 asks for reinforcement of about 20,000 more US troops to join the 33,000 on the ground as part of the 70,000 combined NATO deployment.
Still engaged in Iraq, Bush sends 5,000 soldiers.
2009: Karzai re-elected
Karzai is reelected in August 20, 2009 elections that are marred by massive fraud, a turnout of only 30-33 percent and Taliban attacks.
He takes 49.7 percent of votes in the first round and his challenger Abdullah Abdullah, a former minister, withdraws before the runoff.
On December 1 President Barack Obama elected on promises to end the Iraq and Afghanistan wars, announces the deployment of 30,000 more US soldiers.
Bin Laden is killed on May 2, 2011 in a US special forces operation in Pakistan.
By 2012 more than 150,000 foreign soldiers are deployed in Afghanistan, of whom 100,000 are American.
June 2014: Ghani takes power
On June 14, 2014, Ashraf Ghani is elected president with 56 per cent of votes.
It is Afghanistan's first democratic transfer of power, with Karzai constitutionally barred from seeking another term.
The vote is marred by violence and a bitter dispute over claims of fraud.
December 2014: NATO withdraws
On December 31, 2014 the NATO alliance ends its 13-year combat mission in Afghanistan. About 12,500 foreign soldiers of whom 9,800 are American remain to train Afghan troops and conduct counter-terrorism operations.
The following year the Taliban make their greatest military advances since they were removed from government.
The Islamic State (IS) group also becomes active. Bloody attacks multiply, notably in Kabul.
2018: Taliban talks
Insurgency-linked violence claims a record number of lives in 2018, according to a UN tally which records at least 3,804 civilian deaths.
In mid-2018 Washington and Taliban representatives discreetly open talks in Doha focused on slashing the US military footprint in Afghanistan.
In return the US demands the Taliban prevent the country from being used as a safe haven for jihadist groups including Al-Qaeda.
Talks focus on a ceasefire and the opening of Taliban negotiations with the Kabul government.
But on September 7, 2019, US President Donald Trump abruptly calls off the talks after a US soldier is among 12 people killed in an attack in Kabul.
2020: Political crisis
As talks with the US and the Taliban progress, a fresh political crisis breaks out in Afghanistan following another contested election.
On February 18, President Ashraf Ghani is handed his second term in office nearly five months after elections were held, following repeated delays and accusations of malfeasance.
The results are immediately rejected by Ghani's main rival, former chief executive Abdullah Abdullah, who declares he would form his own parallel government.
On February 26, Ghani announces that he will delay his inauguration ceremony until after the US-Taliban deal is signed after being warned by Washington against allowing an election spat to derail a historic deal to withdraw American troops.
The latest bout of political chaos raises renewed concerns that Kabul is heading into Taliban peace talks deeply divided and without an overwhelming popular mandate, sparking fears that more conflict may lie ahead.