A chronology of key events around the 1979 Soviet invasion of Afghanistan and the decade-long war it sparked:
The pro-Soviet regime in Kabul took power through a bloody coup
27 April: Afghanistan's communist People's Democratic Party seizes power in a coup but begins internal feuding. The country is renamed Democratic Republic of Afghanistan (DRA). An Islamic and conservative insurgency soon begins in the provinces.
5 December: A friendship treaty is signed with the USSR, building on Soviet economic and military support given to Afghanistan since the early 1950s.
March: The USSR begins massive military aid to the DRA, including hundreds of advisers, as the US scales down its presence after the murder of its kidnapped ambassador. Afghan soldiers mutiny in Herat, massacring Soviet citizens before their rebellion is crushed.
September: Hafizullah Amin emerges as DRA leader from a bout of bloodletting in the government during which President Nur Mohammed Taraki is killed.
The USSR said it had no troops left in Afghanistan after February 1989
24 December: The Soviet defence ministry reveals orders to senior staff to send troops into Afghanistan, following a decision taken by the Politbureau's inner circle on 12 December. Commandos seize strategic installations in Kabul.
29 December: After a week of heavy fighting during which Soviet commandos kill Amin and ground forces pour across the border, Babrak Kamal is installed as the DRA's new Soviet-backed leader.
Resistance intensifies with various mujahideen groups fighting Soviet forces and their DRA allies. The US, Pakistan, China, Iran and Saudi Arabia supply money and arms. The US leads a boycott of the Moscow Olympics.
The United Nations General Assembly calls for Soviet withdrawal.
Half of the Afghan population is now estimated to be displaced by the war, with many fleeing to neighbouring Iran or Pakistan. New Soviet leader Mikhail Gorbachev says he will withdraw troops from Afghanistan.
The US begins supplying mujahideen with Stinger missiles, enabling them to shoot down Soviet helicopter gunships. Karmal is replaced by Mohammed Najibullah.
The DRA, USSR, US and Pakistan sign peace accords and the Soviets begin pulling out troops.
15 February:The USSR announces the departure of the last Soviet troops. Civil war continues as the mujahideen push to overthrow Najibullah, who is eventually toppled in 1992.