Why did the Soviet Union invade Afghanistan?

In late December 1979, the Soviet Union invaded Afghanistan under the pretext of supporting the Friendship Treaty of 1978. Events following the invasion set the stage for a savagely violent...