For Algeria remains the most painful wound within the body politic of the Republic – save, perhaps, for its continuing self-examination of Nazi occupation – and provides a fearful context for every act of Arab violence against France. The six-year Algerian war for independence, in which perhaps a million and a half Arab Muslims and many thousands of French men and women died, remains an unending and unresolved agony for both peoples. Just over half a century ago, it almost started a French civil war.

Maybe all newspaper and television reports should carry a “history corner”, a little reminder that nothing – absolutely zilch – happens without a past. Massacres, bloodletting, fury, sorrow, police hunts (“widening” or “narrowing” as sub-editors wish) take the headlines. Always it’s the “who” and the “how” – but rarely the “why”. Take the crime against humanity in Paris this week – the words “atrocity” and “barbarity” somehow diminish the savagery of this act – and its immediate aftermath.

We know the victims: journalists, cartoonists, cops. And how they were killed. Masked gunmen, Kalashnikov automatic rifles, ruthless, almost professional nonchalance. And the answer to “why” was helpfully supplied by the murderers. They wanted to avenge “the Prophet” for Charlie Hebdo’s irreverent and (for Muslims) highly offensive cartoons. And of course, we must all repeat the rubric: nothing – nothing ever – could justify these cruel acts of mass murder. And no, the killers cannot call on history to justify their crimes.

But there’s an important context that somehow got left out of the story this week, the “history corner” that many Frenchmen as well as Algerians prefer to ignore: the bloody 1954-62 struggle of an entire people for freedom against a brutal imperial regime, a prolonged war which remains the foundational quarrel of Arabs and French to this day.

The desperate and permanent crisis in Algerian-French relations, like the refusal of a divorced couple to accept an agreed narrative of their sorrow, poisons the cohabitation of these two peoples in France. However Cherif and Said Kouachi excused their actions, they were born at a time when Algeria had been invisibly mutilated by 132 years of occupation. Perhaps five million of France’s six and a half million Muslims are Algerian. Most are poor, many regard themselves as second-class citizens in the land of equality.

Like all tragedies, Algeria’s eludes the one-paragraph explanation of news agency dispatches, even the shorter histories written by both sides after the French abandoned Algeria in 1962.

For unlike other important French dependencies or colonies, Algeria was regarded as an integral part of metropolitan France, sending representatives to the French parliament in Paris, even providing Charles de Gaulle and the Allies with a French “capital” from which to invade Nazi-occupied north Africa and Sicily.

More than 100 years earlier, France had invaded Algeria itself, subjugating its native Muslim population, building small French towns and chateaux across the countryside, even – in an early 19th-century Catholic renaissance which was supposed to “re-Christianise” northern Africa – converting mosques into churches.

The Algerian response to what today appears to be a monstrous historical anachronism varied over the decades between lassitude, collaboration and insurrection. A demonstration for independence in the Muslim-majority and nationalist town of Sétif on VE Day – when the Allies had liberated the captive countries of Europe – resulted in the killing of 103 European civilians. French government revenge was ruthless; up to 700 Muslim civilians – perhaps far more – were killed by infuriated French “colons” and in bombardment of surrounding villages by French aircraft and a naval cruiser. The world paid little attention.

But when a full-scale insurrection broke out in 1954 – at first, of course, ambushes with few French lives lost and then attacks on the French army – the sombre war of Algerian liberation was almost preordained. Beaten in that classic post-war anti-colonial battle at Dien Bien Phu, the French army, after its debacle in 1940, seemed vulnerable to the more romantic Algerian nationalists who noted France’s further humiliation at Suez in 1956.

What the historian Alistair Horne rightly described in his magnificent history of the Algerian struggle as “a savage war of peace” took the lives of hundreds of thousands. Bombs, booby traps, massacres by government forces and National Liberation Front guerrillas in the “bled” – the countryside south of the Mediterranean – led to the brutal suppression of Muslim sectors of Algiers, the assassination, torture and execution of guerrilla leaders by French paratroopers, soldiers, Foreign Legion operatives – including German ex-Nazis – and paramilitary police. Even white French sympathisers of the Algerians were “disappeared”. Albert Camus spoke out against torture and French civil servants were sickened by the brutality employed to keep Algeria French.

De Gaulle appeared to support the white population and said as much in Algiers – “Je vous ai compris,” he told them – and then proceeded to negotiate with FLN representatives in France. Algerians had long provided the majority of France’s Muslim population and in October 1961 up to 30,000 of them staged a banned independence rally in Paris – in fact, scarcely a mile from the scene of last week’s slaughter – which was attacked by French police units who murdered, it is now acknowledged, up to 600 of the protesters.

Algerians were beaten to death in police barracks or thrown into the Seine. The police chief who supervised security operations and who apparently directed the 1961 massacre was none other than Maurice Papon – who was, almost 40 years later, convicted for crimes against humanity under Petain’s Vichy regime during the Nazi occupation.

The Algerian conflict finished in a bloodbath. White “pied noir” French colonists refused to accept France’s withdrawal, supported the secret OAS in attacking Algerian Muslims and encouraged French military units to mutiny. At one point, De Gaulle feared that French paratroopers would try to take over Paris.

When the end came, despite FLN promises to protect French citizens who chose to stay in Algeria, there were mass killings in Oran. Up to a million and a half white French men, women and children – faced with a choice of “the coffin or the suitcase” – left for France, along with thousands of loyal Algerian “harki” fighters who fought with the army but were then largely abandoned to their terrible fate by De Gaulle. Some were forced to swallow their own French military medals and thrown into mass graves.