In 1952, former Cuban president Batista led a military coup and seized power when it became clear he was not going to be re-elected. He placed Cuba under a repressive military dictatorship and began to establish close relations with the United States. This allowed American companies to buy up the majority of Cuba's natural resources, plus under his rule, the country became a haven for organized crime syndicates, all of which angered a young lawyer named Fidel Castro. Castro put together a group of 138 men and on July 26th, 1953, attacked an isolated Barracks in Moncada in the hope of securing more weapons. The attack was a disaster, and the rebels were fought back. securing more weapons. The attack was a disaster, and the rebels were fought back. Most of those who were not killed were captured, including Fidel and his brother Raúl. The public trial of the captured Rebels helped turn public opinion and Castro's favor when he argued against the dictatorship and said, "History will absolve me". He was sentenced to 15 years in prison, but Batista was under International and Domestic pressure for reforms and released the political prisoners in just two years. Fidel and Raúl fled to Mexico to regroup and make new plans for the revolution. They met with other Cuban exiles and an Argentinian doctor named Che Guevara, who joined the '26th of July Movement'.  In the meantime, a controversial election and increasing unemployment in Cuba, led to more and more anti-Batista riots, although they weren't necessarily socialist. Batista responded by becoming even more oppressive, which led to even more people calling for him to resign. Back in Mexico, the revolutionaries purchased a small yacht named 'Granma' and in November 1956, 82 Men set sail for Cuba. The Cuban government, however, was aware that the rebels were returning to Cuba and attacked them. Only a handful of them survived to escape up into the mountains. From their Mountain Base they gathered new supporters and launched guerrilla attacks on Military targets. Plus, foreign journalists were allowed to visit, and along with their Pirate Radio Station, this gave their struggle International attention and ultimately increased their popularity. Meanwhile, in the cities too, new rebel groups were launching attacks against Batista. Angered and desperate, in 1958, Batista sent a large army into the mountains to try and flush the rebels out once and for all. However, this was a disaster and the hardened guerrilla fighters were able to fight them back, causing many in the Army to switch sides. The rebels then saw this as the perfect opportunity to launch a Counterattack. Che Guevara took control of one arm of the Rebel Army and headed to Santa Clara. Cienfuegos took another and marched into Yaguajay and Castro followed with the reinforcements. As they passed through towns and villages, they were largely welcomed, demonstrating to the world that Batista's regime was on the brink of falling. The International Community persuaded Batista to flee, allowing the rebels to move into Havana in January, 1959, relatively unopposed. The revolutionaries took control of Cuba and their leaders, Fidel, Raúl and Che, consolidated their power by wiping out all remnants of Batista from the island, and arrested and killed many of those old supporters. This, as well as a few other repressive laws, led to a large number of people fleeing to the US. On the other hand, they nationalized the land that was owned by us companies, shut down the Mob's casinos and set about reforming and improving health facilities, housing and schools. These socialist policies angered the Americans, who decided to place economic sanctions on them. The US would also go on to aid a group of Cuban Exiles, in an attempt to oust Fidel Castro in 1962. But the infamous 'Bay of Pigs' invasion was a disaster. In the aftermath of the 'Bay of Pigs' invasion, Castro announced that Cuba was a Socialist Republic and rushed into seeking an alliance with the Soviets, and this friendship led to one of the most infamous consequences of the revolution, 'The Cuban Missile Crisis'. The revolution spurred on left-wing idealists in Latin America, whose actions indirectly led to far-right reactionary dictatorships in countries like Argentina and Chile.