The Conservative government largely avoided being blamed during the election campaign for its failure to stop the terrorist attacks. It appealed to British communal solidarity in defiance of those who carried out the atrocities, which was a perfectly reasonable stance, though one that conveniently enables the Conservatives to pillory any critics for dividing the nation at a time of crisis. When Jeremy Corbyn correctly pointed out that the UK policy of regime change in Iraq, Syria and Libya had destroyed state authority and provided sanctuaries for al-Qaeda and Isis, he was furiously accused of seeking to downplay the culpability of the terrorists. Nobody made the charge stick that it was mistaken British foreign policies that empowered the terrorists by giving them the space in which to operate.

A big mistake in British anti-terrorist strategy is to pretend that terrorism by extreme Salafi-jihadi movements can be detected and eliminated within the confines of the UK. The inspiration and organisation for terrorist attacks comes from the Middle East and particularly from Isis base areas in Syria, Iraq and Libya. Their terrorism will not end so long as these monstrous but effective movements continue to exist. That said, counter-terrorism within the UK is much weaker than it need be.

The attacks in London and Manchester come very much from the Isis playbook: minimum human resources deployed to maximum effect. Overall direction is distant and at a minimum, no professional military skills on the part of the killers are necessary, and the absence of guns makes them almost impossible to forestall. Tracing the movement of a small number of weapons is usually easier than following a large number of people.

There is a self-interested motive for British governments to portray terrorism as essentially home-grown cancers within the Muslim community. Western governments as a whole like to pretend that their policy blunders, notably those of military intervention in the Middle East since 2001, did not prepare the soil for al-Qaeda and Isis. This enables them to keep good relations with authoritarian Sunni states like Saudi Arabia, Turkey and Pakistan, which are notorious for aiding Salafi-jihadi movements. Placing the blame for terrorism on something vague and indefinable like “radicalisation” and “extremism” avoids embarrassing finger-pointing at Saudi-financed Wahhabism which has made 1.6 billion Sunni Muslims, a quarter of the world’s population, so much more receptive to al-Qaeda type movements today than it was 60 years ago.

London Bridge terror attack: All murder victims named

Deliberate blindness to very specific places and people – Sunni states, Wahhabism, Saudi Arabia, Syrian and Libyan armed opposition – is a main reason why “the War on Terror” has failed since 9/11. Instead, much vaguer cultural processes within Muslim communities are targeted: President Bush invaded Iraq, which certainly had nothing to do with al-Qaeda, and today President Trump is denouncing Iran as the source of terrorism at the very moment that Isis gunmen are killing people in Tehran. In Britain the main monument to this politically convenient lack of realism is the ill-considered and counter-effective Prevent programme. This not only fails to find terrorists, but actively assists them, by pointing the security agencies and police in the wrong direction. It also poisons the waters for anybody trying to improve relations between the British state and 2.8 million Muslims in the UK by generating a mood of generalised suspicion and persecution.

Under the 2015 Counter-Terrorism and Security Act, people who work in public bodies – teachers, doctors, social workers – have a legal duty to report signs of terrorist sympathy among those they encounter, even though nobody knows what these are. The disastrous consequences of this are explained, with a wealth of devastating supporting evidence, by Karma Nabulsi in a recent article on the Prevent programme in the London Review of Books entitled ‘Don’t Go to the Doctor.’ She tells the story of Syrian refugees, a man and his wife, who sent their small son, who spoke almost no English, to a nursery school. Because of his recent traumatic experiences in Syria he spent much of his time there drawing planes dropping bombs. The staff of the nursery might have been expected to comfort the young war victim, but instead they called the police. These went to see the parents and questioned them separately, shouting questions like: “How many times a day do you pray? Do you support President Assad? Who do you support? What side are you on?”

If Isis or al Qaeda were asked to devise a programme least likely to hamper their attacks and most liable to send the police off on wild goose hunts, they would find it difficult to devise anything more helpful to themselves than Prevent and the Counter-Terrorism and Security Act. The great majority British people have as much idea about how to identify a potential terrorist as their ancestors 400 years ago did about detecting witches. The psychology is much the same in both cases and 2015 Act is in effect a crackpots’ charter in which five per cent of the British population are vaguely regarded as suspicious. Nabulsi writes that a Freedom of Information request to the police “revealed that more than 80 per cent of the reports on individuals suspected of extremism were dismissed as unfounded”.

Boris Johnson criticises Jeremy Corbyn for voting against an anti-terrorism law he also opposed

The Government may persuade the gullible that turning everybody working for the state into a potential informant produces lots of useful intelligence. In fact, it serves to clog up the system with useless and misleading information. On the rare occasion it produces a nugget, there is a good chance that it will be overlooked.

The oversupply of information explains why many who say they reported genuinely suspicious behaviour found that they were ignored. Often this action was very blatant and revealing such as the Manchester bomber Salman Abedi shouting down a preacher in a mosque who criticised Isis. He was also associated with the extreme jihadi Libyan Islamic Fighting Group. One of three killers on London Bridge and in Borough Market, Khuram Butt, had even expressed his pro-Isis views on television and another of the three, the Italian-Moroccan Youssef Zaghba, was stopped by Italian police at Bologna Airport on suspicion of trying to go to fight for Isis or al-Qaeda in Syria. Yet none of these were picked up by the police.

In most cases, potential terrorists do not have to be sniffed out, but have made their Isis sympathies only too apparent. The government's obsessive belief that terrorists are isolated individuals “radicalised” by the internet without being a member of any network is simply untrue. Dr Peter Neumann of the International Centre for the Study of Radicalisation at Kings College London is quoted as saying that “the number of cases where people have been entirely radicalised by the internet is tiny, tiny, tiny.”