The moment the Soviet Union inserted itself in the Afghan Civil War, they started a domino-like spiral of violence that continues even to this day nearly 40 years later. On one side of the situation, the Soviets were never able to assert and gain control over the huge country.
On the other side of the problem, the United States, via CIA operatives and neighboring Arab countries, supported guerrilla fighters by delivering arms to support their resistance efforts.
Naming themselves the Mujahideen, the resistance fighting militias considered themselves embroiled in a Holy War against the invading communist infidels. Even after the Red Army pulled out of the country Afghanistan remained in a continued state of chaos.
The Taliban rose to and seized power in the war-torn nation. Following the events of 9/11 NATO forces invaded the embattled country making roughly the same mistakes the Russians did a generation earlier.
The Soviet–Afghan War lasted nearly a decade from December 1979 to February 1989. The Mujahideen resistance fighters fought a war of attrition against the Soviet Army and allied Afghan forces. In all, approximately 850,000 to 1.5 million civilians were killed over the decade long conflict and millions of other Afghans were forced to flee their homeland as refugees. Most resettled in Pakistan or Iran.
The conflict started with the rise of the pro-Soviet government of Nur Mohammad Taraki in a 1978 coup. The Taraki regime initiated a series of radical modernization reforms throughout the country. Traditional Muslim Afghans opposed the reforms. The Taraki government responded with a mass suppression effort arresting and executing nearly 27,000 Muslim Afghans as political prisoners.
As a result, large parts of the country were in open rebellion by April of 1979 and by December the government had lost control of territory outside of the cities. Responding to requests for assistance from the Afghan government, the Soviet government, under leader Leonid Brezhnev, sent covert troops to advise and support the Afghan government in its war against the Mujahideen rebels.
On December 24, 1979 they deployed the 40th Army. Upon arrival in the capital city of Kabul they staged a coup killing the Afghan President and installing a puppet leader in Afghan Socialist Babrak Karmal.
Concerned the events occurring in Afghanistan, in January 1980, the foreign ministers of 34 nations of the Islamic Conference adopted a joint resolution demanding “the immediate, urgent and unconditional withdrawal of Soviet troops” from Afghanistan. At the same time, the UN General Assembly passed a resolution protesting the Soviet intervention by a vote of 104-18.
As a result of the Soviet intervention, Mujahideen fighters began to receive massive amounts of aid and military training in neighboring Pakistan and China through funding provided by the U.S. and Arab monarchies in the Persian Gulf.
Soviet control was based in the cities which they occupied and maintained the main axis of communication. The Mujahideen in the meantime waged its guerrilla warfare in small groups which controlled the 80% of the country that had escaped both Afghan government and Soviet control. In turn, the Soviets were ruthless in their warfare.
They utilized their superior air power to decimate the Afghan rebels razing villages to the ground denying them safe haven, destroying irrigation ditches denying them vital life-giving water resources and laying millions of land mines making basic travel a matter of life and death.
As the war wore on, the Soviets increased their commitment to squashing the rebels sending in 108,800 troops by the mid-1980s increasing the level of fighting through the country. Because of this increased military commitment both the military and diplomatic costs of the war to the USSR was high.
By mid-1987 the Soviets, under the new leadership of reformist Mikhail Gorbachev, began to withdraw troops from Afghanistan. The final rounds of withdrawals began on May 15, 1988 with the last troops leaving on February 15, 1989.