The days of April 17-19, 1961, saw the United States attempt to invade Cuba and remove the left-leaning government of Fidel Castro from power.

Castro, a Cuban revolutionary, had been actively working for the removal of Cuba's American-backed dictator, Fulgencio Batista, who finally fled the island nation in 1958. Soon after, Castro created his own dictatorship and, though he would not come out as a communist until late December 1961, United States officials began to fear the ramifications of a Soviet satellite only 90 miles from U.S. territory.

As his presidency drew to a close, Dwight D. Eisenhower tasked the Central Intelligence Agency with finding a way to remove Castro. The CIA had already been successful in fomenting coups against socialist leaders in Iran and Guatemala, and the president had every reason to expect a CIA action in Cuba would meet with similar success.

Historian Tim Weiner notes in his book, “Legacy of Ashes: The History of the CIA,” that Eisenhower met with CIA head Allen Dulles in August 1960 about a plan to remove Castro. The CIA, which had already been funding a secret army of 500 anti-Castro Cuban exiles, asked for an additional $10.75 million for the project. Eisenhower agreed, adding, “so long as the Joint Chiefs, Defense, State and CIA think we have a good chance of being successful.”

Though Eisenhower never formally authorized the execution of a plan to invade Cuba with the exile army, the CIA continued its preparations. A few months later, John F. Kennedy stood in the White House and inherited the responsibility for the operation.

According to Robert Dallek, Kennedy's biographer, the young president met with CIA chiefs in February 1961 and expressed his desire to land the Cuban exile army while keeping American participation in the scheme limited to merely logistical and intelligence concerns. Fearing repercussions from the Soviet Union, Kennedy did not wish to engage America in a shooting war with Cuba.

Kennedy stated that he was “willing to take the chance of going ahead; (but) ... he could not endorse a plan that put us in so openly, in view of the world situation.”

After some preliminary airstrikes against Cuban airfields on April 15 and 16, the Cuban exile army, now numbering 1,500 men, landed at Cuba's Bay of Pigs along the island's southern coast shortly after midnight on April 17.

Though Soviet intelligence had been predicting an American move against the island, Soviet Premier Nikita Khrushchev appeared genuinely surprised. According to his biographer, William Taubman, Khrushchev implored America to pull back, lest its actions lead to a general, nuclear war: “It is not too late to prevent what may be irreparable.”

Historian John Lee Anderson said that the attack certainly came as no surprise to Castro, who had agents within the exile army. Castro soon mobilized his military units to contain the attack, and the exile army found itself pent up on the beach, expecting American air support that Kennedy had never authorized but that the CIA chiefs had led many to believe was coming.

Dallek writes that the plan failed as much from a flawed strategy as the failure to provide air cover for the exiles. To expect roughly 1,500 exiles to galvanize anti-Castro sentiment on the island and overthrow the dictator was fanciful at best. Castro's superior numbers, local weapons superiority, logistical and communications base and intelligence ensured that the exiles faced long odds from the beginning.

By April 20, the failure of the mission was evident. A total of 114 members of the exile army had been killed in the attack. Additionally, Castro's forces could boast of nearly 1,200 prisoners. Gleeful at America's failure, Khrushchev offered a speech dripping with righteous indignation: “Aggressive bandit actions cannot save your system. In the historic process ... every people decides and will decide the fate of its country itself.”

Kennedy, fully aware of the gravity of the disaster, called for Dulles' resignation: “Under a parliamentary system of government” he told the CIA chief and his top aide, Richard Bissell, “it is I who would be leaving office. But under our system, it is you who must go.”

The debacle hung over Kennedy for his next year in office, contributing to a string of foreign policy blunders. In June, his Vienna summit with Khrushchev would prove fruitless and humiliating, and in August the East German government's creation of the Berlin Wall further added to his troubles and gave the perception of an inexperienced politician out of his depth.

Kennedy would not recover fully from the Bay of Pigs fiasco until October 1962 and his successful handling of the Cuban Missile Crisis.

Cody K. Carlson holds a master's degree in history from the University of Utah and currently teaches at Salt Lake Community College. He is also the co-developer of the popular "History Challenge" iPhone/iPad apps. Email: ckcarlson76@gmail.com