''I believe that one has to be consistent right up to the end,'' Fidel Castro wrote in his resignation letter Tuesday, and he was.
The world may long argue whether he was a communist or a social reformer, a murderous tyrant or a visionary savior, but no one will ever doubt that he was a shrewd survivor who left power just as he ruled: on his own terms.
Defying the expectations -- and, in many cases, the hopes -- of an eternally bemused world, Castro bowed out not a step or two ahead of an enemy tank or a mob of angry voters, but on a timetable of his own choice, handing Cuba over like a family heirloom to his little brother.
He outlived the Soviet Union, the nation that inspired him, succored him and sometimes betrayed him. He outlasted nine U.S. administrations that tried, with varying degrees of enthusiasm, to topple him. He outstayed dozens of other dictators, from Augusto Pinochet to Saddam Hussein, who came and went while he ruled in Havana.
Aside from his aversion to elections -- the bullets fired on his behalf were better than ballots, Castro always said, for ''it is not only with a pencil marking a ballot, but also with blood, that a people can take part in a patriotic life'' -- he was anything but rigid in his ideology.
If economic times were hard, he might crack the door to permit private restaurants and small businesses, then slam it shut with a two-hour speech denouncing the creeping revisionism of Havana hot-dog vendors.
If there was a current of political restlessness, he might allow dissidents to speak up a little, then jail them. If he needed a favor from Washington, he might reach out, then lash back with something like the Mariel boatlift.
Castro was so flexible when it came to political tactics that scholars and journalists argue to this day whether he's really a Marxist-Leninist or simply a practitioner of ''wily political opportunism,'' as one historian put it.
But of his survival skills, there was no dispute. Castro withstood Mafia hitmen, CIA-backed invasions, the collapse of world communism, a four-decade U.S. economic embargo and the mortal hostility of millions of his own countrymen.
If he had regrets, they were too few to mention. ''I distrust the seemingly easy path of apologetics or its antithesis of self-flagellation,'' he wrote in his farewell letter.
That, too, is consistent. Castro has never apologized: not in 1953, when he sent his first rag-tag band of followers on a suicidal attack against a military barracks that ended with nearly all of them tortured, dead or both.
Not in 1961, when he went on television to tell the Cuban people he'd been deceiving them all along and that he drew his inspiration not from Martí but Marx.
Not in 1962, when his attempt to install Soviet missiles on his island came so breathtakingly close to ending in nuclear war that even his allies in Moscow were rattled.
Hardship, he explained, was the lifeblood of the revolution. ''I feel my belief in sacrifice and struggle getting stronger,'' Castro told his countrymen. ``I despise the kind of existence that clings to the miserly trifles of comfort and self-interest.''
At the beginning, at least, many believed. When Castro rode into Havana on a tank on Jan. 8, 1959, after toppling the inept dictator Fulgencio Batista, the streets were filled with cheering throngs. So strong was Castro's charisma that millions of Cubans continued to support him even as he jailed, exiled or executed political opponents and even apostate followers.
Barely 31, sporting a beard and a jaunty cigar, he seemed -- not just to Cubans, but to followers all over the world -- to mark a clean break with a corrupt, imperial past. His quick political collision with the United States over nationalization of American-owned companies on the island only enhanced his underdog romanticism.
But Cuban political and economic independence proved just as illusory as the elections Castro promised in the early days of the revolution. Over the next five decades, the island would be yoked more firmly to first the Soviet Union and later Venezuela than it ever was to the United States, its economy surviving on the $4 billion to $6 billion a year subsidies from friends.
Meanwhile, Castro's anti-yanqui fanaticism -- reciprocated in Washington by the Bay of Pigs invasion, a series of hare-brained assassination plots utilizing everything from poisonous cold cream to exploding sea shells, and the eternal economic embargo -- led him to ever-stranger political alliances. By his final years in power, Castro embraced both Iran, with its Islamic fundamentalist government, and North Korea, with the megalomaniacal Marxism of Kim Jong Il without blinking.
His blood feud with the United States muffled criticism of Castro overseas, where resentment of Washington's power festered. At home, it was more difficult. As political freedoms wilted under the watchful eye of Cuba's Ministry of the Interior and the economy crumbled under the weight of Castro's eccentric micromanagement, millions of Cubans either bolted (three million, more than a fifth of the population, now live outside the country) or retreated into sullen despair.
By the 1990s, the island's suicide rate had tripled from pre-revolutionary levels, and one of every three pregnancies ended in abortion. The birth rate has dropped so low that Cubans are not even replacing themselves: Women average less than two children apiece.
''There are a number of factors feeding into the birth rate,'' said Lisandro Perez, a Florida International University sociology professor who studies Cuba. ``But one of them is certainly that having children is an investment in the future, and a lot of Cubans aren't willing to do that.''
The birthrate, falling since the mid-1960s, is the tip of the latest iceberg approaching the Cuban ship of state. Cuba's rapidly aging population is now the second-oldest in Latin America. A fifth of the country has hit retirement age, and in another decade or so it will be a fourth.
''You are going to have a serious manpower problem there,'' warned Carmelo Mesa-Lago, an emeritus professor of economics at the University of Pittsburgh. ``Somebody is going to have to work to pay the pensions of all those old people.''
That labor will take place in one of the most decrepit infrastructures in the world. Cuba's industrial underpinning consists almost entirely of ancient Soviet factories and machinery that was nearly outmoded even when it was installed.
Mesa-Largo for decades has been monitoring the production of 20 key Cuban products, everything from eggs to textiles. Last year, production of 14 of them was lower than in 1989. The Cuban sugar crop, once the linchpin of the entire economy, was the smallest in a hundred years.
Many economists believe Cuba, caught in a pincer of economic and demographic failures, is no more than a year or two from a major crisis, much worse than the one it faced when the Soviet Union collapsed. If so, Castro's political timing is once again perfect.
''He's leaving behind a mess,'' said Edward Gonzalez, an emeritus political science professor at UCLA who consults for the Rand Corporation. ``And now someone else will have to clean it up.''