Garvan Walshe is a former National and International Security Policy Adviser to the Conservative Party. He runs Brexit Analytics.

There exists a grainy videotape of my dad standing on a platform in front of a microphone in Caracas, addressing a military parade by the Venezuelan army. Who knows whether Hugo Chavez himself – or how many of the two thousand generals of what are now styled the Bolivarian Revolutionary Armed Forces – heard him stress that among their traditions was loyalty to the constitutional order of the Republic?

For some dissident military units, loyalty to the constitution has now come to mean armed opposition to the government led by Nicolas Maduro (Chavez’s uncharismatic successor). Rebels in one province took control of a military base for several hours, and left taking significant quantities of weapons with them. Videos of soldiers pledging themselves against the government have started to appear. Two months ago, a soldier in a helicopter hurled grenades at the Supreme Court building.

Amidst a catastrophic economic crisis and widespread criminal violence it appears that an insurgency is beginning to take shape. How did Venezuela, which used to subsidise Ken Livingstone’s mayoralty in London and which Jeremy Corbyn “celebrated for its achievements” descend to such chaos?

Chavez himself used to call his ideology “Socialism in the twenty-first century”. This was in reality an insult to socialism, which presupposes at least an attempt at central economic planning. Chavez’s economic system did not even rise to the sophistication of this failed economic model. Instead, he simply sold oil and distributed the proceeds. It appeared to work while the price was high (though he mismanaged the nationalised oil firm terribly), and his country’s fortunes began to collapse with the price of crude.

The story is the familiar one: as the money began to dry up, subsidised goods became hard to find; price controls produced shortages. Essential goods such as toilet paper would become impossible to buy, except on the black market. The currency collapsed and inflation exploded. Essential services, like water and electricity, are now available for only a few hours each day. This has been accompanied by an extraordinary rise in robbery and murder that the state’s plentifully staffed security services have been powerless to prevent.

Despite government control of broadcasting, in these circumstances the opposition have started to win elections. First in the provinces, gaining support until, in 2015, the MUD, as the opposition coalition is known, secured a majority in the national assembly.

Unable to govern constitutionally, Maduro´s regime resorted to arresting opposition leaders: there are now some 400 political prisoners. Faced with street demonstrations, it deploys both official police (who ride motorbikes in tactics that resemble those used in Iran) and “unofficial” gangs of thugs to suppress dissent. And stymied by the continued existence of an opposition-controlled parliament, the regime stooped to rigging an election for an ad-hoc but constituent assembly that has declared itself to be all-powerful.

Those elections, held last Sunday, were so heavily rigged that even the voting machine manufacturer accused the regime of inflating tallies by a million. More than a dozen people were killed in demonstrations.

The regime’s slide into tyranny hasn’t been accompanied by diplomatic isolation. Sympathetic left-wing governments in Nicaragua and Bolivia give it enough support to avoid censure by the Organisation of American States (OAS). And though it grinds its people into poverty and subjects them to arbitrary violence, it can still count on a well of support from ignorant left-wingers across the globe.

If one shouldn’t be too hard on ordinary ignorant left-wingers (after all it was the ignorant right-wingers of the Federation of Conservative Students who thought “Hang Nelson Mandela” badges the height of fashion), there are others, like Corbyn, who deserve no such leniency.

Venezuela is not, for him, a far away country of which he can claim to know nothing. Latin American culture and politics is something with which he has been intimately connected for decades. He has even married two people from the region. He surely knows that Chavista populism isn’t the only alternative to a traditionalist, oligarchic right. There are successful moderate left-wing movements in Brazil and Chile. And in Venezuela itself, constitutional Chavistas have broken with Maduro´s regime. But instead of supporting them, Corbyn found time to condemn attacks “on the security forces” of Venezuelan dictatorship. This privilege appears to have been bestowed only on the servants of the Bolivarian revolution: I don’t recall him ever extending such concern to members of the Israel Defence Forces or Royal Ulster Constabulary.

Venezuela’s regime has brought the country to the brink of civil war. A diplomatic process that brought government and opposition together to restore constitutional rule, could help avoid one. But only if the regime feels it needs to regain legitimacy. People who were its friends in the early years of Chavista idealism need to get this message across before it’s too late.