News that Cuba's Fidel Castro is stepping down brings an end to the longest, and most controversial, presidency in the world.
The 81-year-old leader, who has been ill for some years, said in a letter published on a state newspaper's website: "It would be a betrayal of my conscience to accept a responsibility requiring more mobility and dedication than I am physically able to offer."
The final words of his message promised "I will be careful", possibly a wry reference to the more than 600 assassination attempts he has survived since becoming president.
Fidel Castro Ruz has ruled Cuba for 49 years, despite unrelenting efforts by the US to kill or overthrow him, and has outlived most of those who led the Cuban revolution with him.
His legacy is fiercely disputed: clearly a man of charisma and courage, he has always understood getting and retaining power better than the art of government. Having led a nationalist revolution against a brutal dictatorship, he instituted a more effective one of his own.
Castro seized power in 1959 in a country that had one of the highest per capita incomes in the Americas. Today it lags behind most of the hemisphere. But he has left it with a rate of infant mortality lower than that of the US, and health and education systems that support a long-lived and literate population, albeit one restricted in what it is allowed to read.
As a student in the 1950s, Castro shared the widespread discontent with the dictatorship of Fulgencio Batista, the army officer who had dominated Cuban politics since the 1930s, first as kingmaker and then as millionaire dictator and mafia henchman. Fidel thought of standing for parliament, but became convinced that anything short of armed struggle was futile.
His claim to be a hero of the revolution is based on two disastrous revolutionary expeditions. The first was the assault on the Moncada barracks in Santiago on 26 July 1953. Fidel and his brother Raú led 160 rebels in a misconceived and bungled attack that even lost the element of surprise when Castro crashed one of the cars in the convoy: 61 rebels were killed and most of the others, including Fidel, were captured. Many were summarily executed.
Fidel escaped the death sentence and was sentenced instead to 15 years in prison. Amnestied 15 months later, Fidel and his younger brother Raú went to Mexico where they met the Argentinian revolutionary Ernesto "Che" Guevara and plotted their return. This was his second disastrous military expedition. Castro and 81 followers crammed into a motor yacht, now enshrined in a large glass case in Havana as one of the world's more unusual revolutionary monuments, and sailed for Cuba with the aim of starting an armed uprising. Within days, 70 of the band were killed, wounded or captured. The survivors, who included Fidel, Guevara, Raú and Camilo Cienfuegos, made it to the Sierra Maestra mountains where, with the support of existing peasant movements, they finally succeeded in launching a guerrilla campaign.
Castro's guerrillas never numbered more than 1,000, but he appropriated credit for a revolution made by many hands: socialists, social democrats, trade unionists, students and democratic liberals - a coalition so broad that, in 1958, the US recognised the hopelessness of the Batista regime and withdrew military support. On 1 January 1959, Batista fled. Castro's moment had arrived. By February, he had been sworn in as prime minister.
Few knew his politics. In the early days, he spoke of reform and elections. He studied Lenin in prison but was not a Communist. In 1959, Castro visited the US. He hired a public relations firm and went on a charm offensive but Eisenhower refused to meet him. He met Richard Nixon, who was not charmed. This was the Cold War and Washington was touchy about the appearance of socialism in its backyard. When the USSR did an oil-for-sugar deal, the US looked on coldly. The wealthy white elite began to leave for the US. With important Cuban exiles, the CIA began to play a role in shaping US policy towards Cuba.
The botched attempt to invade Cuba at the Bay of Pigs in April 1961 with 1,400 CIA-trained exiles, provided Fidel with a narrative that entrenched his power. Finally, he announced that the revolution henceforth was Communist. In February 1962, the US imposed an economic embargo.
Cuba's enduring poverty is, in part, a product of the continuing US embargo. When the Soviet Bloc began to disintegrate in 1989, Cuba was dependent on the USSR and its satellites. When it all collapsed, the Cuban economy plummeted. By 1994 there were riots in Havana.
Castro survived, instituting grudging economic reforms. Increasing tourism, the legalisation of remittances from Cubans abroad and concessions to private economic activity saw Cuba through hard times. There has been a price. Those who benefited were petty entrepreneurs, black marketeers and those with relatives in Miami, while impoverished professionals carry tourists' suitcases for hard currency tips. It was not how Fidel's revolution was meant to be.
Dissent became more evident but has been met with a crackdown on journalists, librarians and other peaceful dissenters. In 2003, 75 defendants, among them prominent journalists, were tried and convicted, receiving savage prison sentences for such crimes as unauthorised lending of books.
Castro has had time to plan for his succession. A younger generation occupies the key posts in government. Visibly frail in recent years, Castro's stumblings and lapses of memory have been picked over by enemies. Even as he resigns office, it is clear that the post-Castro era has dawned.