Afghanistan on Monday was set to inaugurate Ashraf Ghani as successor to President Hamid Karzai, who has led the country since the fall of the Taliban in 2001.
Here is a timeline of key events since 1979, when the Soviet Union invaded Afghanistan, beginning more than three decades of war: In December 1979, Moscow opens a new front in the Cold War by sending troops into poor, mountainous Afghanistan to prop up a communist regime.
The Afghan mujahideen resistance, backed by the West, fights the Soviet Army for a decade until it withdraws in February 1989.
The fall of the communist government of president Mohammad Najibullah in 1992 unleashes a bloody power struggle between different factions that kills nearly 100,000 people in two years and destroys parts of Kabul.
From 1994 the fundamentalist Taliban movement begins to emerge in the country`s south.
The Islamists take power in Kabul in 1996 and install a regime based on a hardline interpretation of Islamic law, banning women from working and introducing stoning as a punishment.
The Taliban, led by Mullah Mohammad Omar, become close to al Qaeda and shelter its leader Osama bin Laden.
After the September 11 attacks, the US leads an invasion that topples the Taliban but fails to find bin Laden.
Hamid Karzai is appointed to lead an interim government, and foreign donors inject billions of dollars to rebuild Afghanistan.
Up to 150,000 soldiers are eventually deployed to help secure the country against the still-resilient Taliban, who carry on a bloody insurgency.
In Afghanistan`s first presidential election based on universal suffrage, Karzai wins 55 percent of the vote on an enthusiastic turnout of 70 percent.
The poll sees only limited violence and is followed a year later by provincial and parliamentary elections.
Karzai wins another term in a contested poll marred by massive fraud, a turnout of only 30-33 percent and violence from the Taliban, who denounce the election as a Western plot.
Karzai wins 49.7 percent of the vote in the first round and his challenger Abdullah Abdullah, a former minister, withdraws before the runoff.
Afghanistan conducts its third presidential election and its first democratic transfer of power, with Karzai constitutionally barred from seeking another term.
After a long and bitter dispute over claims of voting fraud, Ashraf Ghani is elected president amid resurgent Taliban violence and with NATO withdrawing its combat forces.