t rap " ▁that ▁could ▁exp end ▁Soviet ▁resources ▁in ▁a ▁fruit less ▁war , ▁and ▁the ▁U . S . ▁began ▁sending ▁aid ▁to ▁the ▁mu j ah ide en ▁reb els ▁in ▁early ▁ 1 9 7 9 . ▁By ▁December , ▁A min ' s ▁government ▁had ▁lost ▁control ▁of ▁much ▁of ▁the ▁country , ▁prompt ing ▁the ▁Soviet ▁Union ▁to ▁in va de ▁Afghan istan , ▁execute ▁A min , ▁and ▁install ▁P arch am ▁leader ▁Bab rak ▁K arm al ▁as ▁president . ▁ ▁Carter ▁was ▁surprised ▁by ▁the ▁Soviet ▁invasion ▁of ▁Afghan istan , ▁as ▁the ▁cons ensus ▁of ▁the ▁U . S . ▁intelligence ▁community ▁during ▁ 1 9 7 8 ▁and ▁ 1 9 7 9 ▁was ▁that ▁Moscow ▁would ▁not ▁force fully ▁interven e . ▁C IA ▁officials ▁had ▁track ed ▁the ▁deployment ▁of ▁Soviet ▁soldiers ▁to ▁the ▁Afghan ▁border , ▁but ▁they ▁had ▁not ▁expected ▁the ▁S ovi ets ▁to ▁launch ▁a ▁full - f led ged ▁invasion . ▁Carter ▁believed ▁that ▁the ▁Soviet ▁con quest ▁of ▁Afghan istan ▁would ▁present ▁a ▁grave ▁threat ▁to ▁the ▁Pers ian ▁G ulf ▁region , ▁and ▁he ▁vig or ously ▁respond ed ▁to ▁what ▁he ▁considered ▁a ▁dangerous ▁prov ocation . ▁In ▁a ▁tele vised ▁speech , ▁Carter ▁announced ▁san ctions ▁on ▁the ▁Soviet ▁Union , ▁promised ▁renew ed ▁aid ▁to ▁Pakistan , ▁and ▁art ic ulated ▁the ▁Carter ▁doctrine , ▁which ▁stated ▁that ▁the ▁U . S . ▁would ▁rep el ▁any ▁attempt ▁to ▁gain