But Prof Andrew Silke – a counter-terrorism specialist who advises the Cabinet Office and the UN – says research shows that people are drawn to terrorism more because of “identity issues” than ideology.

In a book to be published next month – based in part on interviews with convicted terrorists – Silke and co-author Dr Rick O’Gorman point out that terrorists say they are motivated by wanting to help the people they identify with.

Speaking to the Guardian he said: “The key message is that you have got to see the terrorists as they see themselves if you genuinely want to understand why people are getting involved. If you talk to terrorist themselves, they portray themselves as altruists – they see themselves as fighting on behalf of others, whether it’s the IRA fighting on behalf of the Catholic community in Northern Ireland, or if it’s Islamic State fighting on behalf of the Muslim ummah.”

But he explained: “One of the central messages of social psychology is that most people are capable of horrific things … not just a particular group. The weight of the science suggests that most people become involved in terrorism as a result of relatively ordinary pro-social factors.

“It is counterintuitive, but terrorism is a really muddy concept. One man’s terrorist is another man’s freedom fighter.”

“The evidence isn’t there to say ideology is the prime reason why people are becoming terrorists, and yet ideology is the foundation on which the counterterrorism effort is built on. Everything is pitched in terms of counter ideology, even though ideology is not the prime mover in terms of bringing people into terrorism. That is a mistake. It is not going to be effective in terms of preventing people becoming radicalised. And it diverts attention from other causes which play a role in why people become involved in terrorism.”

He added: “If you focus on countering the ideology, you are going to miss important stuff. At the early stages those that become involved in terrorism have a very limited understanding of the ideology – they are not scholars.”

David Cameron: extremist ideology is 'struggle of our generation'

Read more

He pointed out that there has been no similar focus on ideology in the fight against dissident republicans in Northern Ireland.

“Counter-ideology just doesn’t feature at all in counter-terrorism in Northern Ireland – because there is a general belief that it isn’t relevant and it doesn’t work,” he said. “Whereas with Islamic terrorism it is seen as being effective. Part of the reason is that most of the politicians making the decisions are not Muslim. So it is convenient for them for a whole range of reasons to talk about ideology.”

Silke and O’Gorman set out the evidence for “terrorism as altruism” in a chapter in Terrorism and Evolutionary Psychology, which is scheduled to be published by Routledge at the end of August. It cites interviews with convicted terrorist as well suicide video messages including those of the 7/7 bombers.

The pair write: “This theme of fighting on behalf of others and in reaction to the suffering of others … recurs frequently in accounts of the personal motivation of individual terrorists.”

Silke said that exploring this self-perception as altruists could help identify and and even prevent people becoming terrorists.

“Why would anyone want to take their family to Syria to join Islamic State?” he asked. “Nobody is going to say they are doing it to join the most evil movement that has ever existed. So you need to see it more in terms of how they see themselves and how they see the world. Then you can see the incentives to join and realistic obstacles to them doing it.”