Foreign relations of Cuba needed oil. Relations between the countries deteriorated rapidly. In April 1961, following air attacks preparing for the Bay of Pigs Invasion by CIA-trained Cuban exiles, prime minister Fidel Castro declared Cuba to be a socialist republic, and moved quickly to develop the growing relations between Cuba and the Soviet Union. In 1962, Cuba was expelled from the Organization of American States. Shortly afterwards, many nations throughout Latin America broke ties with Cuba, leaving the island increasingly isolated in the region and dependent on Soviet trade and cooperation. Following the establishment of diplomatic ties, and after the Cuban missile crisis in
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,