The Algerian army, we were told by the usual suspects this afternoon – on French television as well as in America – “are not soft on terrorists” and had “expertise” in “fighting terrorism”. Too true – but only half the truth. Because they are not “soft” on hostages either. They are as ruthless with captives as they are with captors.

The slaughter of the good and the bad at the In Amenas gas plant yesterday was thus utterly predictable, because the Algerian military – the real rulers of the nation – were “blooded” in a civil war which taught them to care as little about the innocent as they did about the guilty.

It was the Algerian military which sent intelligence officers to Damascus in 1993 to learn how Hafez al-Assad destroyed the Islamists of Hama 11 years earlier – and then used the same tactics to liquidate Algeria's own Islamist insurgency.

Download the new Independent Premium app Sharing the full story, not just the headlines

Word has it that Algerian officers visited Syria last year to return the compliment: by teaching the Syrian military – now fighting a far more dangerous uprising – how the Algerians won their “dirty” war against the Armed Islamic Group and its al-Qa'ida affiliates.

The Algerians lent their “expertise” to Tunisia's Ben Ali just before his overthrow and offered the same to Mubarak's goons in Egypt.

Opaque as Algeria's military may appear to foreigners, its foundational myths – of utter brutality towards its enemies, whatever the cost – have appealed to the Pentagon and to the French, who both maintained their co-operation with the army's elite at Cherchell outside Algiers in the 1990s – when they knew full well that the country's soldiers and paramilitary forces were indulging in an orgy of torture against insurgents and civilians.

Three things were certain last night about the Algerian bloodbath; that the Algerians will put the entire blame for the killing of the hostages upon the al-Qa'ida-inspired kidnappers, that the Western governments whose citizens died will go along with this – and not utter a word of condemnation of the Algerian military – and that by midday today, the entire story will change out of all recognition. Prime ministers, foreign ministers and newsdesks beware.

David Cameron's total ignorance of the Algerian government's inherent cruelty led Downing Street to mutter some truly stupid remarks today. The Algerians, they said, “seemed determined to lead the way”.

You bet they did. Talking to hostage-takers is anathema to them, at best a means to wear down kidnappers before annihilating them. The country's Prime Minister, Abdelmalek Sellal, is a bright, intelligent man who appeals to folk like Cameron and François Hollande; laid-back, well-educated, a doyen of the Algerian civil service. It's thus easy to forget that Sellal was Minister of Interior from 1998-99 when the Islamist rising was supposedly destroyed.

One of his predecessors, Abderrahmane Meziane-Chérif, once told me of his principles in dealing with “terrorists”. “A farmer can be an eradicator when he pulls weeds from the fields,” he said. “And sometimes a man has to purify water and cleanse things of insects and bugs...” Meziane-Chérif was called the “eradicateur”.

And yes, of course, the Islamists who took so many hostages in Algeria were ultimately to blame for the massacre. Neither side offers any quarter; thus hostages, bystanders, civilians are “collateral damage” – yes, that hateful phrase again – to both sides. Nor is that surprising.

For the real marriage of both al-Qa'ida and the Algerian military started after the Russian occupation of Afghanistan.

It is a largely secret story which even today has never been fully revealed. Desperate to stem their losses, the Soviet government asked their socialist Algerian allies for intelligence help; and the Algerian intelligence services dispatched their own men to Afghanistan to pose as “mujahedin” alongside real Algerian Islamists fighting for Osama bin Laden.

Information from these Algerian military spies allowed Soviet forces to fight back.

But when the Russians left and the Algerians came home, the army ordered their own men to remain undercover with the Islamist groups. So when the terrible civil war began, individual officers to keep their cover participated in the massacre of civilians. And thus became contaminated by atrocities. This is not a tale which the Algerian government admits to. Nor will the West examine this grim history.

But the reality is that the real Cobras of the intelligence world live within the Algerian military “pouvoir”.

By comparison, the Cobra in Downing Street – David Cameron's famous security “committee” – is a humble and very sleepy grass snake.