The Soviet war in Afghanistan lasted nine years from December 1979 to February 1989. Part of the Cold War, it was fought between Soviet-led Afghan forces against multi-national insurgent groups. The decade-long war resulted in millions of Afghans fleeing their country, mostly to Pakistan and Iran. Hundreds of thousands of Afghan civilians were killed in addition to the rebels in the war.
The initial Soviet deployment of the 40th Army in Afghanistan began on December 24, 1979. The final troop withdrawall started on May 15, 1988, and ended on this day, February 15, 1989, under the last Soviet leader, Mikhail Gorbachev.
The Afghan government, having secured a treaty in December 1978 that allowed them to call on Soviet forces, repeatedly requested the introduction of troops in Afghanistan in the spring and summer of 1979. They requested Soviet troops to provide security and to assist in the fight against the mujahideen rebels. After almost a decade of conflict, the final Soviet troops left Afghan soil.