The official response to every jihadist-inspired terrorist attack in the west since 2001 has been to pour petrol on the flames. That was true after 9/11 when George Bush launched his war on terror, laying waste to countries and spreading terror on a global scale. It was true in Britain after the 2005 London bombings, when Tony Blair ripped up civil liberties and sent thousands of British troops on a disastrous mission to Afghanistan. And it’s been true in the aftermath of last week’s horrific killings at Charlie Hebdo and a Jewish supermarket in Paris.

In an echo of Bush’s rhetoric, the former French president Nicolas Sarkozy declared a “war of civilisations” in response to attacks on “our freedoms”. Instead of simply standing with the victims – and, say, the vastly larger numbers killed by Boko Haram in Nigeria – the satirical magazine and its depictions of the prophet Muhammad have been elevated into a sacred principle of western liberty. The production on Wednesday of a state-sponsored edition of Charlie Hebdo became the latest test of a “with us or against us” commitment to “our values”, as French MPs voted by 488 votes to one to press on with the military campaign in Iraq. To judge by the record of the past 13 years, it will prove a poisonous combination, and not just for France.

Nothing remotely justifies the murderous assault on Charlie Hebdo’s journalists, still less on the Jewish victims singled out only for their religious and ethnic identity. What has become brutally obvious in the past week, however, is the gulf that separates the official view of French state policy at home and abroad and how it is seen by many of the country’s Muslim citizens. That’s true in Britain too, of course. But what is hailed by white France as a colour-blind secularism that ensures equality for all is experienced by many Muslims as discrimination and denial of basic liberties.

In a country where women are bundled into police vans because of the way they dress, freedom of speech can also look like a one-way street. Charlie Hebdo claims to be an “equal opportunities offender”, abusing all religions alike. The reality, as one of its former journalists put it, has been an “Islamophobic neurosis” that focused its racialised baiting on the most marginalised section of the population. This wasn’t just “depictions” of the prophet, but repeated pornographic humiliation.

For all the talk of freedom of expression being a non-negotiable right, Holocaust denial is outlawed in France, and performances by the antisemitic black comedian Dieudonné have been banned. But just as there is a blindness in sections of progressive France about how the secular ideology used to break the grip of the powerful is now used to discipline the powerless, the right to single out one religion for abuse has been raised to the status of a core liberal value.

The absurdity was there for all to see at the “Je suis Charlie” demonstration in Paris on Sunday. A march supposedly to defend freedom of expression was led by serried ranks of warmongers and autocrats: from Nato war leaders and Israel’s Binyamin Netanyahu to Jordan’s King Abdullah and Egypt’s foreign minister, who between them have jailed, killed and flogged any number of journalists while staging massacres and interventions that have left hundreds of thousands dead, bombing TV stations from Serbia to Afghanistan as they go.

The scene was beyond satire. But it also highlighted the central role of the war on terror in the Paris atrocities, and how the serried ranks are likely to use them for their own ends. Of course, the cocktail of causes and motivations for the attacks are complex: from an inheritance of savage colonial brutality in Algeria via poverty, racism, criminality and takfiri jihadist ideology.

But without the war waged by western powers, including France, to bring to heel and reoccupy the Arab and Muslim world, last week’s attacks clearly wouldn’t have taken place. That war on terror has lasted 13 years – even if attempts to control the region long predate it – unleashing brutality and destruction on a vast scale.

It’s what the killers say themselves. The Kouachi brothers were radicalised by the Iraq war and trained in Yemen by al-Qaida. Cherif Kouachi insisted the attacks had been carried out in revenge for the “children of Muslims in Iraq, Afghanistan and Syria”. Ahmed Coulibaly said they were a response to France’s attacks on Isis, while claiming the supermarket slaughter was revenge for the deaths of Muslims in Palestine.

Such wanton killings are, of course, entirely counterproductive to the causes they are supposed to promote – and the targets, shaped by a reactionary religious framework, feed the idea that these are some mutant product of European cultural wars. But there were no such attacks in Europe before 2001. The apparent exception was the Paris bombings of 1995, a direct spillover from Algeria’s civil war and France’s role in it. Instead, a form of violent fundamentalism fostered in the war against the Soviet Union in Afghanistan 30 years ago has blown back into western heartlands.

France famously refused to take part in the US-British aggression against Iraq. But it has been making up for lost time ever since, sending troops to Afghanistan, intervening in one African state after another, from Libya and Mali to Ivory Coast and the Central African Republic, bombing Iraq and backing Syrian rebels. Like Britain, France has been arming and garrisoning the Gulf autocrats, while the French president has declared himself a “partner” to the Egyptian dictator Sisi and “ready” to bomb Libya again.

The former French prime minister Dominique de Villepin, who led opposition to the Iraq war, this week described Isis as the “deformed child” of western policy. The west’s wars in the Muslim world “always nourish new wars” and “terrorism among us”, he wrote, while “we simplify” these conflicts “by seeing only the Islamist symptom”.

He’s right – but he’s not one of the serried ranks who will use the latest attacks to justify more military intervention. Given what has taken place over the past decade, Europeans are fortunate that terrorist outrages have been relatively rare. But a price has been paid in loss of freedoms, growing antisemitism and rampant Islamophobia. So long as we allow this war to continue indefinitely, the threats will grow. In a globalised world, there’s no insulation. What happens there ends up happening here too.