The Soviet-Afghan War (1979-1989) was a conflict between the Soviet Union and the Democratic Republic of Afghanistan and the rebel Mujahideen, who were supported by many Western and Arab nations. The Soviets intervened in December 1979 after over a year of unsuccessful fighting against the anti-communist Mujahideen rebels, and in a war that lasted the duration of the 1980s, 175,000 Soviet troops fought guerrillas in the Afghan countryside. In 1989 the Soviets cut their losses and withdrew, and the DRA was overthrown in 1992. 97,000 Soviets, 180,000 Mujahideen, and 1,500,000 Afghan civilians were killed, with 6 million Afghans fleeing their country.
The conflict in Afghanistan that lasted almost the entire length of the 1980s had its genesis in July 1973, when the country's monarchy was overthrown and a republic established under Mohammed Daoud. Islamic leaders opposed to his modernizing government fled to neighboring Pakistan, where in 1975 they set up the mujahideen ("holy warriors") to overthrow Daoud's regime.
The assassination of Daoud in April 1978 by the Revolutionary Council, and his replacement with a communist-led government, prompted the US to support the mujahideen the following July. Alarmed by American-armed instability on its southern border, the Soviet Union sent in 85,000 troops to support the Afghan government in December 1979.
The Afghan army swiftly disintegrated as soldiers deserted, leaving Soviet troops to fight a mujahideen familiar with the mountainous terrain and largely supported by the local population. As a result, the Soviets could hold only the major towns, while their attempts to subdue the countryside through aerial bombardment and siege tactics sent millions of refugees fleeing to Pakistan and other neighboring countries.
By 1985 guerrilla warfare was being conducted in every province, convincing the new Soviet government of Mikhail Gorbachev to cut its losses and leave. A phased withdrawal of Soviet troops began in May 1988 and was finally completed the following February. Within three years the mujahideen took control and an Islamic republic was set up, but civil war between rival groups broke out in December 1992, allowing the extremist Taliban regime to seize power in December 1996.