Fidel turned his trial defense into a manifesto that he smuggled out of jail, famously declaring, “History will absolve me.”
Freed under a pardon, Mr Castro fled to Mexico and organized a rebel band that returned in 1956, sailing across the Gulf of Mexico to Cuba on a yacht named Granma. After losing most of his group in a bungled landing, he rallied support in Cuba’s eastern Sierra Maestra mountains.
Three years later, tens of thousands spilled into the streets of Havana to celebrate Batista’s downfall and catch a glimpse of Castro as his rebel caravan arrived in the capital on 8 January 1959.
The US was among the first to formally recognise his government, cautiously trusting Mr Castro’s early assurances he merely wanted to restore democracy, not install socialism.
Within months, Mr Castro was imposing radical economic reforms. Members of the old government went before summary courts, and at least 582 were shot by firing squads over two years. Independent newspapers were closed and in the early years, homosexuals were herded into camps for “re-education.”
Pope meets Fidel Castro
In 1964, Mr Castro acknowledged holding 15,000 political prisoners. Hundreds of thousands of Cubans fled, including Castro’s daughter Alina Fernandez Revuelta and his younger sister Juana.
Still, the revolution thrilled millions in Cuba and across Latin America who saw it as an example of how the seemingly arrogant Yankees could be defied. And many on the island were happy to see the seizure of property of the landed class, the expulsion of American gangsters and the closure of their casinos.
Mr Castro’s speeches, lasting up to six hours, became the soundtrack of Cuban life and his 269-minute speech to the UN General Assembly in 1960 set the world body’s record for length that still stood more than five decades later.
As Mr Castro moved into the Soviet bloc, Washington began working to oust him, cutting US purchases of sugar, the island’s economic mainstay. Mr Castro, in turn, confiscated $1 billion in US assets.
The American government imposed a trade embargo, banning virtually all American exports to the island except for food and medicine, and it severed diplomatic ties on 3 January 1961.
On 16 April of that year, Castro declared his revolution to be socialist, and the next day, about 1,400 Cuban exiles stormed the beach at the Bay of Pigs on Cuba’s south coast. But the CIA-backed invasion failed.
The debacle forced the US to give up on the idea of invading Cuba, but that didn’t stop Washington and Mr Castro’s exiled enemies from trying to do him in. By Cuban count, he was the target of more than 630 assassination plots by militant Cuban exiles or the US government.
The biggest crisis of the Cold War between Washington and Moscow exploded on 22 October 1962, when President John F Kennedy announced there were Soviet nuclear missiles in Cuba and imposed a naval blockade of the island. Humankind held its breath, and after a tense week of diplomacy, Soviet leader Nikita Krushchev removed them. Never had the world felt so close to nuclear war.
Fidel Castro meeting Iran’s Supreme Leader Sayyed Ali Hosseini Khamenei (AP)
Castro cobbled revolutionary groups together into the new Cuban Communist Party, with him as first secretary. Labour unions lost the right to strike. The Catholic Church and other religious institutions were harassed. Neighborhood “revolutionary defence committees” kept an eye on everyone.
Mr Castro exported revolution to Latin American countries in the 1960s, and dispatched Cuban troops to Africa to fight Western-backed regimes in the 1970s. Over the decades, he sent Cuban doctors abroad to tend to the poor, and gave sanctuary to fugitive Black Panther leaders from the US.
But the collapse of the Soviet bloc ended billions in preferential trade and subsidies for Cuba, sending its economy into a tailspin. Mr Castro briefly experimented with an opening to foreign capitalists and limited private enterprise.