European political leaders are making the same mistake in reacting to the massacre at the Christmas fair in Berlin, in which 12 died, as they did during previous terrorist attacks in Paris and Brussels. There is an over-concentration on the failings of the security services in not identifying and neutralising the Tunisian petty criminal, Anis Amri, as the threat he turned out to be. There is too little focus on bringing to an end the wars in Syria and Iraq which make this type of atrocity unstoppable.

In the aftermath of the killings the visibility of Amri, who was shot dead in Milan this morning, as a potential threat looks misleadingly obvious, and the culpability of those who did not see this appears more glaring than it really was. The number of possible suspects – suspected before they have done anything – is too great to police them effectively.

No politician or security official wishing to retain their job can tell a frightened and enraged public that it is impossible to defend them. Those in charge become an easy target for critics who opportunistically exploit terrorism to blame government incompetence or demand communal punishment of asylum seekers, immigrants or Muslims. At such times, the media is at its self-righteous worst, whipping up hysteria and portraying horrifying but small-scale incidents as if they were existential threats. This has always been true, but 24/7 news coverage makes it worse as reporters run out of things to say and lose all sense of proportion. As the old American newspaper nostrum has it: “if it bleeds, it leads.”

But in over-reacting, governments and media play into the hands of the terrorists who want to create fear and demonstrate their strength, but whose greatest gains come when they provoke an exaggerated self-destructive response. 9/11 was the most successful terrorist attack in history, not just because it destroyed the Twin Towers but because it lured the Bush administration into invading Afghanistan and Iraq. Subsequently, Guantanamo, Abu Ghraib, rendition, torture and “targeted killings” (otherwise known as assassination campaigns), all justified by 9/11, have acted as recruiting sergeants for al-Qaeda type organisations.

The war on terror has failed more demonstrably than most wars: al-Qaeda numbered in the hundreds in 2001, but today – along with Isis – it has tens of thousands of fighters and supporters spread across dozens of countries.