The Soviet Union invaded in 1979 to support the tottering Afghan Communist regime , touching off a long and destructive war .