Marxism–Leninism Cuban Revolution, led by Fidel Castro and Ché Guevara, overthrew the régime (1925–1959) of Fulgencio Batista to establish the Republic of Cuba, a Communist state recognised by the Soviet Union. In response, the United States attempted a coup d'état against the Castro government, such as the unsuccessful Bay of Pigs invasion (April 1961), by anti-communist Cuban exiles, sponsored by the CIA. The next year, there occurred the Cuban missile crisis (October 1962), a diplomatic dispute between the United States and the Soviet Union over the presence of medium-range, Soviet nuclear missiles in Cuba. The Soviet Union resolved the nuclear-missile crisis
CIA activities in Afghanistan by Khalq rival Hafizullah Amin in September. Amin was considered a "brutal psychopath" by foreign observers; even the Soviets were alarmed by the brutality of the Afghan communists, and suspected Amin of being an agent of the U.S. Central Intelligence Agency (CIA), although that was not the case. By December, Amin's government had lost control of much of the country, prompting the Soviet Union to invade Afghanistan, execute Amin, and install Parcham leader Babrak Karmal as president. Carter was surprised by the invasion, as the consensus of the U.S. intelligence community during 1978 and 1979—reiterated as late as September 29,