<Li> Afghan Civil War (1996--2001) </Li> <Li> War in Afghanistan (2001--present) </Li> <P> The Soviet--Afghan War lasted over nine years, from December 1979 to February 1989 . Insurgent groups known as the mujahideen fought against the Soviet Army and the Democratic Republic of Afghanistan government, mostly in the country's rural countryside . The mujahideen groups were backed by the United States and Pakistan, making it a Cold War proxy war . Between 562,000 and 2,000,000 civilians were killed and millions of Afghans fled the country as refugees, mostly to Pakistan and Iran . </P> <P> Prior to the arrival of Soviet troops, the communist People's Democratic Party of Afghanistan took power after a 1978 coup, installing Nur Mohammad Taraki as president . The party initiated a series of radical modernization reforms throughout the country that were deeply unpopular, particularly among the more traditional rural population and the established traditional power structures . The government vigorously suppressed any opposition and arrested thousands, executing as many as 27,000 political prisoners . Anti-government armed groups were formed, and by April 1979 large parts of the country were in open rebellion . The government itself was highly unstable with in - party rivalry, and in September 1979 Taraki was killed under orders of his rival Hafizullah Amin, the Minister of Foreign Affairs and now the president . Deteriorating relations and worsening rebellions led the Soviet government, under leader Leonid Brezhnev, to deploy the 40th Army on December 24, 1979 . Arriving in the capital Kabul, they staged a coup, killing president Amin and installing Soviet loyalist Babrak Karmal from a rival faction . </P>

How long was the russian war in afghanistan