<P> The Bay of Pigs Invasion (Spanish: Invasión de Playa Girón or Invasión de Bahía de Cochinos or Batalla de Girón) was a failed military invasion of Cuba undertaken by the Central Intelligence Agency (CIA) - sponsored paramilitary group Brigade 2506 on 17 April 1961 . A counter-revolutionary military group (made up of mostly Cuban exiles who traveled to the United States after Castro's takeover, but also some US military personnel), trained and funded by the CIA, Brigade 2506 fronted the armed wing of the Democratic Revolutionary Front (DRF) and intended to overthrow the increasingly communist government of Fidel Castro . Launched from Guatemala and Nicaragua, the invading force was defeated within three days by the Cuban Revolutionary Armed Forces, under the direct command of Castro . </P> <P> The coup of 1952 led by General Fulgencio Batista, an ally of the United States, against President Carlos Prio, forced Prio into exile to Miami, Florida . Prio's exile was the reason for the 26th July Movement led by Castro . The movement, which did not succeed until after the Cuban Revolution of 31 December 1958, severed the country's formerly strong links with the US after nationalizing American economic assets (banks, oil refineries, sugar and coffee plantations, along with other American owned businesses). </P> <P> It was after the Cuban Revolution of 1959, that Castro forged strong economic links with the Soviet Union, with which, at the time, the United States was engaged in the Cold War . US President Dwight D. Eisenhower was very concerned at the direction Castro's government was taking, and in March 1960 he allocated $13.1 million to the CIA to plan Castro's overthrow . The CIA proceeded to organize the operation with the aid of various Cuban counter-revolutionary forces, training Brigade 2506 in Guatemala . Eisenhower's successor, John F. Kennedy, approved the final invasion plan on 4 April 1961 . </P> <P> Over 1,400 paramilitaries, divided into five infantry battalions and one paratrooper battalion, assembled in Guatemala before setting out for Cuba by boat on 13 April 1961 . Two days later, on 15 April, eight CIA - supplied B - 26 bombers attacked Cuban airfields and then returned to the US . On the night of 16 April, the main invasion landed at a beach named Playa Girón in the Bay of Pigs . It initially overwhelmed a local revolutionary militia . The Cuban Army's counter-offensive was led by José Ramón Fernández, before Castro decided to take personal control of the operation . As the US involvement became apparent to the world, and with the initiative turning against the invasion, Kennedy decided against providing further air cover . As a result, the operation only had half the forces the CIA had deemed necessary . The original plan devised during Eisenhower's presidency had required both air and naval support . On 20 April, the invaders surrendered after only three days, with the majority being publicly interrogated and put into Cuban prisons . </P>

Who was president during the bay of pigs invasion