To his critics, the late Fidel Castro was a totalitarian despot, an opponent of free speech and a man determined to preserve his hard-won revolution whatever the cost.

But to his defenders and admirers, he was a leader whose enlightened and practical approach to social care provided Cuba with enviable health and education systems.

Figures from the UN children’s agency, Unicef, show that Cuba’s youth literacy rate stands at 100%, as does its adult literacy rate. In Mexico, youth literacy is around 98.5%, while adult literacy is at 93.5%. In the Dominican Republic, meanwhile, youth literacy is at 98.1% for females aged 15-24, 96.1% for males of the same age, and adult literacy is at 90%.

Many of the educational gains were made in the early years of the revolution, not least during the 1961 literacy campaign that saw hundreds of thousands of Cubans, including schoolchildren, mobilising to educate their compatriots.

The statistics, however, tend to mask today’s commonplace shortages of housing, food and transport and the high costs of such basic items as books, soap and clothes.

Perhaps even more vaunted are claims about the standard of Cuba’s healthcare. The island’s reputation for medical excellence – a boon long enjoyed by allied governments and countries struck by natural disaster and medical emergencies – was most recently boosted by the deployment of Cuban medical staff to parts of west Africa during the Ebola crisis.

In October 2014, 15,000 medical workers volunteered to participate in the relief effort. More than 450 specially trained Cuban doctors and nurses arrived in Liberia, Guinea and Sierra Leone to combat the disease, making them the largest single national medical force.

One doctor told Reuters at the time that he and his colleagues felt they had a responsibility to help: “We know what can happen. We know we’re going to a hostile environment. But it is our duty. That’s how we’ve been educated.”

The country’s high ratio of doctors to patients and its proactive, community-centred approach to healthcare has long been the envy of many western countries – not least the UK, which sent 100 GPs and a delegation from the Department of Health in 2000 to discover how it managed to deliver care on a far smaller budget. Despite serious shortages of food and drugs, the country has consistently managed to keep its population of 11 million people healthy into old age.

Life expectancy in Cuba is 81 years for women and 77 for men. In the UK, it is 83 years and 79 respectively. And while the former spends $2,475 per capita on healthcare, the latter spends $3,337. Cuba dedicates 11.1% of its GDP to health; the UK 9.1%.

Some, however, argue that the success of Cuba’s social care owes as much to politics and pragmatism as to equality and governmental magnanimity.

As a senior western diplomat told the Guardian in 2007: “Health and education are the revolution’s pillars of legitimacy so the government has to make them work. If they don’t, it loses all its moral authority.”