What circumstances link the Soviet invasion of Afghanistan in 1979 with the origins of AL QAEDA?

What circumstances link the Soviet invasion of Afghanistan in 1979 with the origins of AL QAEDA?