Possibly the only thing that Ayman al-Zawahiri, the leader of al-Qaida, has ever said worth noting is that the United States and its allies will never defeat al-Qaida for so long as they see it as an organisation rather than as an idea. Although the so-called Islamic State looks much more like an organisation than al-Qaida ever has, the same truism applies: it might be weakened by an extended military campaign either side of the Iraq/Syria border, but it would not disappear. In fact, while its organisational strength would decline, its appeal as a victim of western aggression might well increase.

Quasi-terrorist groups such as Islamic State attract a wide range of supporters motivated by a complex mix of aspiration, frustration, idealism and evil. Indeed, a study by the Soufan Group calculates that by June 2014, there were around 12,000 fighters from 81 countries in Syria and Iraq – and the subsequent capture of Mosul and the declaration of a caliphate are likely to have brought in even more who believe that the Islamic State can offer them something that is lacking from their current lives.

Over the last five years, the focus of global counter-terrorism has moved increasingly from military engagement towards community engagement as national authorities have recognised the need to build resilience against the violent extremist narrative at the local level. The task is becoming easier as the number of examples grows of groups that promise to deliver – through force – benefits denied by an uncaring government, only to leave the community traumatised and divided, and considerably worse off than before. But even if there are an increasing number of stories to illustrate the negative consequences of totalitarian terrorism, there is still a need to have the right people tell them.

In this respect, politicians and policemen are generally addressing an audience that shares their views or accepts their wisdom. But while the muscular response that they advocate may seem appropriate to the vast majority of people who will never be tempted to join a violent extremist group in Syria or Iraq, it does not much impress those who are more vulnerable to the terrorist narrative. Terrorists argue that the response is always muscular, even to legitimate grievances peacefully expressed, and that the only way to bring about change is therefore also through violence. Nor does the threat of force do much to persuade those who have already gone to Syria and Iraq that their reasons for going and the cause they support are fundamentally wrong.

The United Kingdom has put a great deal of effort into the implementation of the Prevent strand of its counter-terrorism policy, and is widely acknowledged elsewhere in the world as the leader in this field. Prevent is based on the obvious observation that it is altogether preferable to stop someone becoming a terrorist rather than to deal with him once he has done so. Unfortunately, once an individual has started to absorb terrorist material available on the internet, and contacted some of the people behind it, he becomes hard to reach. It takes skill, understanding and perseverance to turn him back.

It is unsurprising therefore that many of the people who have been most successful in undermining the terrorist narrative are themselves ex-extremists. They know from personal experience why people can be attracted to terrorism; they know how the groups recruit; and they have all the credibility of someone who has been on the inside. Pre-eminent among them are the people who can talk about their experiences in war zones and explain why going abroad to fight is a very bad idea.

For this reason alone, it would seem sensible to encourage British and other foreign fighters who have joined the Islamic State or other extremist groups in Syria and Iraq, and now realise that this was wrong, to come home. These ex-fighters could help the authorities to understand better than they do now why people are still going to Syria and Iraq and what needs to be done to slow the flow to a trickle or stop it altogether. These are the people who can expose the true nature of the Islamic State and its leadership. Their stories of brutality and the motives behind it will be far more credible and persuasive than the rhetoric of men in suits. These repentant fighters need a way out, and although the law must take its course, they need to know that there is a place for them back at home if they are committed to a non-violent future, and all the more so if they are willing to help guide others away from the desperate bleakness of the Islamic State.

Richard Barrett is a member of the Soufan Group in New York and since 2004 has worked with the UN on counter-terrorism. He is the former global counter-terrorism director of MI6.