In her comments in the aftermath of last weekend’s attacks in London, Theresa May suggested a new direction in the struggle against terrorism. Insisting that “things need to change”, she pointed to the problems of “segregated, separated communities” and “too much tolerance of Islamist extremism”.

It is not clear from her comments exactly what sorts of changes are implied or to be expected, beyond greater control of the internet and increased jail sentences for terrorism-related crimes. But her comments clearly emphasised the need to defeat what she called “the single evil ideology of Islamist extremism”.

In fact, experts are divided on the wisdom and effectiveness of tackling ideology and beliefs within religious communities. Some argue that ideology is the most critical point in the war on terror, no matter how challenging it might be to win hearts and minds. Others counter that focusing so heavily on religious beliefs and practices within Muslim communities carries numerous risks. For example, it encourages the false assumption that Islamic practices and ways of life directly correlate with violence. Common religious acts such as praying every day, growing a beard and fasting in Ramadan start to seem alarming and “radical”. All religious Muslims, in other words, become suspect.

I have seen this happen first-hand among Salafi communities in France, where prominent politicians have called for “a cultural struggle against Salafism”. Salafis are a minority of the world’s Muslims, tremendously diverse and mostly uninvolved in politics, let alone political violence. Yet states are branding them “radical Muslims” in part because of their generally strict practices, but also because some terrorists in Europe hid themselves in Salafi communities.

In my research as a sociologist of religion, I spent time immersed in a Salafi mosque community in south-east France. The neighbourhood was segregated, with an unemployment rate of 40% among young adults. Salafi men and women there appear to be “self-segregated”. But their separation from the wider community was not necessarily their choice. They suffered hostility in public spaces and severe job discrimination, based on where they lived, their Muslim names and religious dress. Research on Muslims in Britain shows the same trends.

The danger of emphasising ideology in counter-terror strategies is that it dismisses this entire social context

Over the years I watched Salafi women, in particular, grow increasingly isolated as the state passed anti-veiling legislation, expanded surveillance and initiated debates about national loyalty that stigmatised Muslims. Some young women I knew withdrew from school after the state banned the headscarf from public schools in 2004.

Others I knew feared for their safety when strangers harassed them, and had trouble envisioning a positive future for themselves in France. Their faith and ethical teachings provided an important refuge for them. For some Salafi men, a rigorous spiritual path focused on God, and everyday religious requirements was an alternative to drugs and prison. Mounir, for example, a young man who worked as a janitor in his public housing complex, was sad that he had lost most of his friends to prison. After prison, he said, they saw a second chance and “want[ed] to come back to God”.

The danger of emphasising ideology in counter-terror strategies is that it dismisses this entire social context, detracting attention from other vital concerns such as the burgeoning prison system and socioeconomic exclusion, and makes everyone suspect based on their religious practice. In fact, strict religiosity may have little to do with terrorism. As researchers have pointed out, most of the attackers in Europe and the US turned to terrorism after years of criminal behaviour, delinquency or domestic violence. Despite their use of Islamic metaphors and practices, they were far from pious. Olivier Roy, a French expert on political Islam, has called this an “Islamisation of radicalism and not the radicalisation of Islam.”

This is not to deny that charismatic Muslim leaders and social networks have played a role in inciting violence as seen throughout Europe. And the Muslim Council of Britain concurred with the sentiment behind May’s comments that “enough is enough”.

But if the struggle is ultimately about ideology, we cannot afford to take a simplistic and unproductive view of it as “radical Islam” versus “British values”. Individuals vulnerable to terrorist recruitment crave meaning and belonging. Perhaps this is why some appear drawn to the convictions and moral structure in Salafi traditions and communities. If we want to grasp the long and tangled roots of “the single evil ideology”, we need to find the courage to collectively struggle for economic and political inclusion. Until this happens, it is not clear what exactly will change.