Two weeks ago, I sat in the gardens of Havana's Hotel Nacional, talking to Dr Gerardo de la Yera, the 76-year-old vice-president of Cuba's 120 Club, a society for people who fancy racking up six score years. As well as talking about his continuing work as a surgeon (he has an unbelievably steady hand for a man of his age), we chewed over the news that Fidel Castro's personal physician thinks the Cuban president might make it beyond that milestone, and on to 140.

Yesterday, however, brought the news that Castro was undergoing surgery for intestinal bleeding, and "temporarily delegating" power to his brother Raul, who is a sprightly 75. All over the island there will be frenzied talk about a subject that amounts to a national obsession: with intimations of Fidel's mortality, which way might his beloved "battle of ideas" go now?

Towards the end of the 90s, there was talk of a subtle progress towards a managed kind of market economy, heralded by an embrace of joint ventures with foreign companies and a new liberal attitude to small businesses, like the paladares: restaurants that can remain in private hands as long as - and how's this for beautifully communist logic? - they have no more than 12 tables. With an influx of money from Venezuela and China, however, the door to private enterprise has slammed shut. Moreover, it is guarded by a breed of young apparatchiks, devoted to the party line and reportedly set on the approach known locally as "safeguarding the achievements of the revolution".

So, as and when Castro exits, will the Cuban people let loose a bottled-up liberalising instinct and bang up against the Caribbean's equivalent of the Red Guards? Could the ensuing clash snuff out the power of the hardline Castro-ites and finally open the economy for the US corporations that are presumably rubbing their hands already? Or might pragmatic minds - such as Carlos Lage Davila, the 55-year-old de facto prime minister and architect of Cuba's abortive flirtation with capitalism - shove dogma to one side, embrace the less threatening aspects of the free market, and nudge Cuba towards the kind of old-fashioned mixed economy that seems to be taking root in the countries with which Castro currently aligns himself -chiefly, Venezuela and Bolivia?

One thing should certainly be kept in mind. Cuba may look forlorn, all peeling buildings and pockmarked roads. Its economy may have long since tumbled into creaking anarchy. But unlike the old states of eastern Europe, the revolution has a few genuine jewels to defend: chiefly, its education system, and globally acclaimed healthcare.

I travelled to Cuba to make a film for Newsnight's new series, The World's Best Public Services. We spent four days in Havana exploring a health system that emphasises preventive care, locks doctors into their local populations and is built around a simplicity from which the NHS would do well to learn. Cuba has an average life expectancy of 77.3 against the US's 77.4. The rates of infant mortality are similarly close. The respective health spends, however, underline the Cuban miracle: in the US, the annual figure per head is $5,711; in Cuba, it's $251.

Gazing into the post-Castro future, few would deny the imperative for fair elections, press freedom, and the kind of liberalisation that would free up the initiative and ambition that currently finds its outlet in the country's labyrinthine black market. There is, however, one caveat. As I discovered when I spoke to trainee doctors, dental patients and expectant mothers, anyone who would let loose a free-market hurricane and sweep away Castro's public services would be in deep, deep trouble. As the president goes under the knife, it is that thought that may be keeping his more enlightened supporters calm.