After the revolution of 1959, Cuba soon took actions inimical to American trade interests on the island. In response, the U.S. stopped buying Cuban sugar and refused to supply its former trading partner with much 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.