A year on from the Madrid bombings, fears are growing that the ideological struggle to stop the next generation of militants in Europe is being lost, reports the BBC's security correspondent Gordon Corera.
Muslims communities across Spain stand against terrorism
At Madrid's vast mosque, Mohammed al-Affifi remembers the chilling impact of the 11 March 2004 bombing on community relations.
"The confidence between the Muslim community and the Spanish people is damaged. It's not so easy now for a Muslim person to find a flat. People say how do I know this person isn't a terrorist?"
Spain is not the only country where the atmospherics have changed in the years since 11 September 2001 and especially since the attacks on Madrid.
A report this week found that discrimination and intolerance against Muslims had increased in the last few years and identified growing distrust and hostility with a concern over polarisation in Europe and the growth of the far-right.
In the Netherlands, the impact of the killing of film-maker Theo Van Gogh accelerated growing tensions.
"As the fight against terrorism has been stepped up and the perceived threat of religious extremism has become a major focus of public debate, Muslims have increasingly felt that they are stigmatised because of their beliefs," Aaron Rhodes, executive director of the International Helsinki Federation for human rights, said in a statement.
Beyond Bin Laden
What worries policymakers is that this dynamic is merely fuelling a problem that could lead to the radicalisation of a new generation.
Madrid revealed how the threat from international terrorism had evolved. Those who carried out the attack were not sent out by Osama Bin Laden, but instead came from self-starting, largely autonomous local groups.
British ministers recently said that there had been a shift from seeing the danger coming externally from foreign nationals to seeing a growing involvement of UK citizens in terrorism - and across Europe, there is a concern about a threat which is more dispersed, but also perhaps more dangerous.
Tributes to remember the victims of the Madrid bombings one year ago
"The Madrid attack moved the goal posts beyond Osama Bin Laden and al-Qaeda as a structured organisation," says Magnus Ranstorp from the Swedish National Defence College.
"We have a hard time keeping up with the terrorist individuals and groups who are radicalising a new generation.
"What people are concerned with here in Europe particularly is understanding the recruitment and radicalisation processes, the broader issues of the failure of social integration within many European states (and) preventing the next generation from heading the call that Osama Bin Laden and al-Qaeda have made."
Senior British officials openly say that in many places, the ideological appeal of al-Qaeda remains undiminished.
And both the EU as a whole and member states like the UK have conducted their own studies of what leads to the radicalisation of a small number of young Muslims and their recruitment into violent activity.
The Iraq factor
Foreign policy is a major driver, acknowledges Gijs De Vries, the EU's counter-terrorist co-ordinator.
"There's no question the war in Iraq and lack of process in the Middle East peace process has been exploited by radical propagandists to try and recruit for terrorism. These conflicts therefore are important as tools in efforts to radicalise Muslims."
Intelligence officials believe the conflict in Iraq may be temporarily absorbing volunteers and energy from Europe. But there are also concerns that it is playing a major role in radicalisation, with signs of a new generation of young Europeans going to Iraq to fight.
After the bombings, many Muslims felt alienated
French counter-terrorism expert Claude Moniquet says the evidence so far of Europeans fighting in Iraq points to a worrying trend.
"We know from the people captured and killed in Fallujah that they were very young - 18, 19 or 20 - which means on 11 September, they were between 14 and 16.
"It's a new generation of jihadists which is just coming out. Before Iraq, usually the average age of the jihadists was between 25 and 30. Now it's 20."
The numbers are not huge, but one concern is that in previous cases like Afghanistan, Chechnya and Bosnia, the fighters who came back to their home countries became key figures in setting up new militant cells.
Gijs de Vries and others believe that a peaceful resolution of international conflicts will be critical to winning the ideological battle.
"An Iraq which is at peace, which is stable and which respects its neighbours can be a powerful force for good in that part of the world. That's why the EU is putting a lot of money towards democratic reform.
"Peace between Israel and the Palestinians would deal a major blow to radical propagandists for terrorist activities, even if by itself it won't eradicate terrorism."
For Mohammed al-Afifi in Madrid, the concern is that the issue of fighting terrorism is being dealt with in a one-sided manner and the ideological battle is being lost, partly because of government policies - whether over Iraq or domestic counter-terrorism.
He argues that the current approach is too simplistic and fails to understand that the issues of injustice and discrimination will only make the fight against al-Qaeda's ideology harder.
"When we are talking now about how to fight terrorism together, it will not only be by police co-operation and international treaties.
"We have to pay attention to what the terrorists say to the people - the injustice - because people can say, 'Why are they treating us this way?'"
Across Europe, tensions remains over how different states balance the aggressive short-term pursuit of terrorists with the longer-term strategy of preventing radicalisation and long term recruitment. A year after Madrid, that task looks harder rather than easier.