ON August 13, 1940, Lluis Companys, the exiled president of the Catalan Republic, was arrested in occupied France by German security forces, on a warrant issued by the Francoist government in Madrid. Companys was deported to Spain where he was tortured, then put on trial (for a whole hour) on charges of “rebellion”.

He was shot by firing squad, the highest-ranking, incumbent elected politician executed during the Second World War. To this day, no Spanish government has annulled this iniquitous verdict or any others of a similar nature, far less put any Francoist on trial.

Yesterday, the exiled, deposed president of Catalonia, Carles Puigdemont, was arrested by German security forces, on a European warrant issued by the neo-Francoist Popular Party government in Madrid.

Like Companys before him, Puigdemont is (literally) charged with “rebellion”, for organising a democratic referendum on Catalan independence last October.

The only violence that occurred during that referendum was perpetrated by the Spanish Guardia Civil when it attacked polling stations and battoned old ladies to the ground.

Of course, Puigdemont won’t be shot but the parallels between 1940 and 2018 are not lost on ordinary Catalans – even those who voted No last October. For the political regime in Madrid is nowhere near as democratic as it pretends.

When Franco died in his bed in 1975, the Francoist regime quietly morphed into its current reincarnation. The old order – particularly the corrupt financial and banking oligarchy Franco had protected – simply adopted a veneer of democracy behind a resurrected monarchy.

Anyone threatening the status quo meets repression. That repression included secret death squads recruited and paid for by the Spanish Ministry of the Interior to hunt down Basque separatists hiding in France, during the 1980s. It includes maintaining more police and paramilitaries per head than any European country west of Putin’s Russia.

Catalan demands for independence threaten the existence of the regime. The neo-Francoists have responded in time-honoured fashion. On Friday, a politically-appointed Spanish court ordered the mass arrest and trial of most of the senior elected and civic representatives of the Catalan people. Some 25 Catalan elected politicians and civic heads – practically the entire leadership of one of Europe’s richest and most culturally vibrant small nations – now face jail sentences of up to 40 years.

Make no mistake: this is a soft coup by the Popular Party regime in Madrid, and its compliant, so-called “constitutional” court.

It is a coup that affects Scotland directly. I had just arrived at the splendid Hands Off Our Parliament rally at Holyrood on Friday, when my phone went. It was Clara Ponsati, the exiled Catalan education minister, who recently returned to her previous job as head of the School of Economics and Finance at St Andrews University. She was phoning to say she expected the Spanish state would likely renew its European arrest warrant for her. In fact, it was issued on Saturday, as part of this weekend’s wave of repression.

If Clara Ponsati and Carles Puigdemont are returned to Spanish prisons, they will join the five senior Catalan politicians rounded up on Friday and four more previously incarcerated. Those arrested include Jordi Turull, the latest candidate for the Catalan presidency, and Carme Forcadell, former speaker of the Catalan Parliament. Vice-president Oriol Junqueras has been held in jail since November 2. Jordi Cuixart and Jordi Sanchez, two civil society leaders who organised the big pro-independence demonstrations, have been in jail since October 16. Those still in exile include Marta Rovira, head of the pro-indy Left Republican Party and Anna Gabriel, of the far-left Popular Unity group (CUP).

Madrid hopes to decapitate the Catalan independence movement. Sadly, the movement itself is disoriented following the strange decision by Puigdemont to first declare a Catalan republic – which everyone took to mean declaring unilateral independence – then flee into exile.

The pro-independence parties won the election in late December, which probably explains Madrid’s desperate attempts to destabilise the Catalan leadership. However, the independence movement is at an impasse.

Madrid’s de facto coup on Friday overshadowed the dramatic events in the Catalan Parliament where the pro-independence parties split in public over installing a new president to replace the deposed Puigdemont. He was elected top of the Together for Catalonia (JuntsxCat) list in the December elections. But Madrid ruled he was ineligible to stand for president as he was in exile.

Puigdemont was replaced as nominee by Jordi Sanchez, imprisoned head of the ANC (roughly equivalent to our Scottish Independence Convention). Madrid ruled Sanchez was ineligible because he was in prison – even though he was only on remand and technically not yet guilty of any crime.

Enter Jordi Turull as a third candidate. Turull, 51, is a long-time member of the centre-right, autonomist Convergence Party, now renamed the European Democrats, or PDeCAT. Turull lost no time in calling for more dialogue with Madrid, hinting he was prepared to backtrack from full independence.

As a result, the four Catalan deputies from the far-left CUP abstained during the presidential vote last Thursday. CUP favours pressing on with the project for a Catalan republic. This meant Turull was one vote short of gaining a majority. A second vote was scheduled for Saturday, by which time it was hoped the CUP could be persuaded to change its mind.

But events intervened on the Friday, with Turull’s arrest.

Catalonia remains without a president and so direct rule from Madrid stays in force. It is important to note how the right-wing Popular Party government in Madrid is applying direct rule. The PP won only 4.2 per cent of the vote in Catalonia last December. Yet it is using direct rule to roll back civil legislation passed by the elected Catalan government. In particular, Madrid is halting the use of Catalan as the first teaching language in local schools – an example of cultural fascism.

What happens next? The incarceration of Jordi Turull means the election process for a new president goes back into the melting pot. Two alternatives now follow. First, the pro-independence parties agree on a fourth candidate, following Puigdemont, Sanchez and Turull. But unless the CUP decides to back such a nomination, that avenue is blocked. True, the CUP might come on board pragmatically, in order to end direct rule. But currently it seems more likely that Catalonia is headed for fresh elections in July.

The outcome of any new elections for the independence movement is problematic unless there is agreement on how to proceed. PDeCAT may well swing back to an autonomist position.

Democrats across Europe must mount a major campaign to defend the imprisoned Catalan leaders. As I write, it is uncertain whether the German police will process the European arrest warrant for Puigdemont or allow him to return to Belgium.

For now, Clara Ponsati is handing herself in to Police Scotland.

We need to bombard the Scottish Government with appeals to reject the warrant for Clara’s arrest on the grounds it is politically motivated.

Democracy is under siege in Catalonia, as it was in 1936.

If they come for Clara Ponsati today, they will come for the rest of us tomorrow.