AND so farewell, Fidel. I was in Havana on a hot, sultry night sometime in the early 2000s. Cuba was still recovering economically from the collapse of the old Soviet Union and the loss of subsidies from its erstwhile Communist ally. I was staying in the Hotel National, once in the pre-Fidel 1950s the playground of visiting Mafia godfathers, now renovated in the hope of attracting dollar-paying tourists.

Actually, with sun, an attempt at decent food, stunning live music and authentic rum, Cuba was a fascinating escape from Tony Blair’s neo-Thatcherite Britain at the turn of the millennium. There really were those lovingly cared for 1950s American Cadillacs breezing the road along the Malecon, Old Havana’s sea front. More amazing still, there were also 1950s Morris Oxfords dodging the ubiquitous peddle taxis. Havana was exotic, friendly, safe and, above all, unique.

That evening, I had the hotel TV turned on, listening to Fidel addressing a great demonstration elsewhere in the city. All day I had watched trucks and busses flooding into Havana carrying excited boys and girls bound for the rally, proof that the regime – warts and all – still carried popular support. On telly, Castro sounded slower and less full of fire than in the heady days of 1959, when he and his followers chased the corrupt dictator Fulgencio Batista out of town.

But under his tutelage, Cuba had preserved its cultural and economic independence from the US colossus a stone’s throw to the north, had delivered decent health care and education to all of its citizens, and – despite the lack of formal democratic rights – had avoided the butchery and sociopathic torture inflicted on hundreds of thousands of ordinary citizens in Brazil, Chile, Argentina, Uruguay, among other Latin American states. The latter, it must be pointed out, with the complicity of that great democratic paragon to the north, which has Washington DC as its capital.

I was thrilled to be watching the Old Leader do his stuff, even if he was no longer as vigorous as in the heady days when he and Che Guevara were transforming Cuba from America’s offshore brothel and gambling den into something more human, while snubbing the geriatric Stalinists in Moscow by preaching world revolution. It was the 1960s after all, and bliss was it to be young. In far off Scotland, the popular movement against basing US Polaris subs in the Holy Loch was under way, soon to give birth to modern Scottish Nationalism. We were part of the same global youth upsurge.

Listening to Fidel on telly, I noticed his words were reverberating with an odd echo that seemed to be coming from outside. Intrigued, I turned down the volume on the TV. Miraculously, I could still hear Fidel. Looking outside I saw the very rally he was addressing in person.

It was a poignant moment to witness the (by then) old revolutionary doing his thing. Even more poignant to see the young revolutionaries at the demo start to peel off, boys and girls hand-in-hand, before the old man finished – though this time Fidel was blessedly shorter than his classic harangues, which often lasted hours. The kids were leaving early because they had done their duty and now wanted a bit of Havana nightlife and sex. It proved the revolution still had its human side.

In the welter of words we will hear about Fidel Castro this week, it is important to remember he was a central participant in the 1962 Cuban missile crisis – when the world came closest to nuclear annihilation during the Cold War. Secretly, the Soviets had sent atomic weapons to Cuba, both to protect the island from US invasion and to offset the ring of US nuclear missiles surrounding Russia. It was a dangerous if not foolhardy gamble because the Americans were bound to react.

I had the chance to have a long conversation with Robert McNamara, President Kennedy’s Secretary of State for Defence during the Cuban missile crisis. He was the man who would send American troops into Cuba, if ordered. But with tactical nukes in the hands of front-line commanders on both sides, such a move would almost certainly have started the world on the road to Armageddon.

Chillingly, McNamara admitted to me that he and the Pentagon had lost communications with its front lines and was blissfully ignorant of what was going on much of the time.

History likes to think we avoided nuclear incineration because of President Kennedy’s willingness to do a deal – the US secretly agreed to take its nuclear rockets out of Turkey and not to overthrow Castro if the Russians took their nukes out of Cuba. And that is true in a formal sense. But we scraped through 1962 more by accident than design.

I say this because we should not romanticise Fidel Castro. His position against the Americans would have been greatly enhanced if he had relied on calling a popular election – which he would have won easily – rather than on Soviet missiles. And while Cuban aid to the Angola rebels and anti-apartheid forces in Africa showed a degree of sacrifice from a small Latin American island people, Castro’s military intervention on behalf of the demented Colonel Mengistu in Ethiopia is less than creditworthy.

The truth is that we can’t build a better society unless we build it on consent, which means democracy. Yet, there are great positive lessons to be learned from Castro’s Cuba. He managed to link national identity and national independence with a progressive, socialist project. The result, with all its deformations, was a society that delivered more than the other Latin states, and for most people.

There is an argument put forward that Scottish independence is best achieved by avoiding ideology. By which, I suppose, is meant trying to create a movement that embraces both left and right.

I certainly don’t think we should be exclusive ideologically, if only on pragmatic grounds. But I do believe the national movement will only galvanise people, especially the young, if it has the goal in sight of a more progressive, socialist – as in communitarian and caring – nation. It is that amalgam of the progressive and the national that Fidel’s Cuba exemplifies.

I don’t mean to sound fluffy here. Any progressive Scotland worth its oats is going to run up against the boundaries of exploitative capitalism and an international system rigged against small countries. Against a perpetual growth machine based on persuading as many folk as possible to consume as much as possible, regardless of whether it is good for them, their bodies, their mental health or the planet itself.

Like Castro’s Cuba, if we ever dare say we oppose that system, Scotland will find itself an international political target. Be warned.

Sixty years ago, in the early hours of November 25, 1956, Fidel Castro, his brother Raul, Ernesto “Che” Guevara, and 79 other insurgents, left Mexico for Cuba in a crowded, leaky boat called Granma – I’ve seen it – and their date with destiny. No-one gave them any chance of overthrowing the Batista regime. Yet two years later, they entered Havana victorious.

Two years from now there could be another independence referendum. All aboard the Scottish Granma!