WHEN history comes to assess France’s response to the Paris terror attacks of January 2015, it may judge them the moment that a battered nation returned to the values it was founded to protect. “France has lived up to its history,” declared Manuel Valls, the prime minister, during a stirring speech to parliament on January 13th. But it was now “at war”: “not against a religion” but “against terrorism, jihadism and radical Islamism.”

Mr Valls’s words, which earned him an astonishing standing ovation from left and right, came on the day when shock, horror and defiance gave way to national grief. The burial of the three police officers who died during three days of terror, from January 7th to January 9th, spoke to the entire nation: Ahmed Merabet, a Muslim man, Franck Brinsolaro, a white man, and Clarissa Jean-Philippe, a French-Caribbean woman all received the Légion d’Honneur, France’s highest honour.

The attacks rocked France, and touched a nerve in the wider world, chiefly because the first target was a symbol of freedom in a country built on the principle of liberty. Twelve of the victims died at the offices of Charlie Hebdo, a satirical newspaper well known for its provocative cartoons lampooning politicians and religions. Four more perished at a kosher supermarket.

The first, spontaneous reaction was unity. Up to 4m people took peacefully to the streets across France on January 11th, with an estimated 1.6m in Paris alone. The “republican march” filled the capital’s boulevards with children in pushchairs, students, pensioners, Catholics and Muslims. Home-made signs bore the words “Je suis Charlie”, now a worldwide profession of free-speech faith. There was wit as well as defiance: nodding to Descartes, one banner read, “Je pense, donc je suis Charlie”. The crowds applauded passing convoys of police and gendarmes. Leaders from across the world linked arms with each other and President François Hollande (though security kept them separate from the throng).

The attempt to understand

No one seemed more surprised by this outpouring than the French themselves. For young people, brought up in a world of on-demand consumerism, it seemed a moment of awakening: a week in which freedoms once taken for granted were shattered then reaffirmed. (The “survivors’ issue” of Charlie Hebdo, pictured, sold out almost instantly on January 14th despite a huge print run.) And the nation found the global expressions of solidarity a gratifying reminder that its values still resonate around the world.

Mais jamais oublié This week, as Mr Valls sent 10,000 soldiers to help protect schools, mosques, synagogues and media offices, and promised more resources for intelligence and policing, hard questions were emerging. The most pressing of these, in the European country that has supplied the most jihadists to the so-called Islamic State (IS) in Iraq and Syria, is understanding the path that takes young citizens from disillusion to terror. Like other European countries struggling with high unemployment, France is not short of disaffected youths and petty criminals among whom jihadist recruiters have often thrived. It is home to Europe’s biggest Muslim minority, its members found disproportionately in the grim high-rise housing estates of the banlieues that ring many French cities. Nearly three weeks of riots in these banlieues in 2005 illustrated the potential for violence among a French-born generation with a grievance. Those responsible for the three most murderous home-grown terror attacks by French citizens since 2012 do indeed share histories of crime and violence, as well as unstable family life, on such rough estates. This was the case for Mohammed Merah, who shot dead seven people, including three Jewish children, in Toulouse in 2012, as it was for Mehdi Nemmouche, who murdered four people at a Jewish museum in 2014. Mr Nemmouche grew up in foster homes, like Chérif and Saïd Kouachi, the orphaned brothers who murdered 12 people at Charlie Hebdo. Amédy Coulibaly, who last week killed Ms Jean-Philippe, the policewoman, as well as the Jewish shoppers, was raised on one of the Paris banlieue’s most notorious estates. Like Mr Merah he served time for robbery before becoming drawn to radical Islam. Yet, as Malek Boutih, a Socialist deputy, put it this week: “It’s not just about poverty; social questions do not explain murder.” Nobody knows what exactly pushes the aggrieved towards terror, or the newly devoted Muslim to jihad. Traditional networks have worked through hardline mosques and Islamic bookstores to recruit radicals and converts in the banlieues. Such links helped Saïd Kouachi, who was on the Americans’ no-fly list, to travel for training by al-Qaeda in Yemen.

More recent “self-service” channels have also drawn some from the middle class to fight for IS. Recruited via the internet, Facebook and Twitter, aided by low-cost flights via Turkey, more than 1,200 are thought to have headed off to the war. Dounia Bouzar, who runs an early-warning centre for parents, says that the number of young girls, converts and those who know little about Islam is striking.

Schools for criminality

If there is a common thread among those who become jihadists, it seems to be the quest to transform small, angry lives into powerful ones. But there are other factors, too. Perhaps the most toxic is prison. Chérif Kouachi seems to have been radicalised during his time at Fleury-Mérogis prison south of Paris in 2005-06. A one-time pizza-delivery driver, he was jailed in a case involving the organisation of jihadists to fight Americans in Iraq. But prison hardened him further, particularly through links he made to Djamel Beghal, a jihadist convicted for attempting to bomb the American embassy in Paris in 2001. Mr Beghal connects Mr Kouachi to a third inmate, Mr Coulibaly, who boasted in a clandestine video filmed in 2007 that prison is “the best school for criminality”. For his part, Merah, in Toulouse, spoke of experiencing “divine inspiration” behind bars.

Although the French do not collect ethnic statistics, some 60% of France’s prison population of 68,000 is Muslim, according to a parliamentary report last year. The proportion is higher in big prisons near cities such as Paris, Lyon, Marseille and Strasbourg. Once inside, the message of moderate Islam dims. The report found only 178 Muslim chaplains working in prisons, next to almost 700 Catholic chaplains. “Many of these criminals arrive with little religious culture,” says Farhad Khosrokhavar, a sociologist. “But the less you know about Islam, the more you are likely to be drawn to radicalised religion.”

After prison comes politics. Chérif Kouachi’s rage was first aimed against America, at a time when France vigorously opposed the invasion of Iraq. Since then France itself has attracted more Islamist fury. The country has successfully pushed back a jihadist incursion into Mali, and carried out air strikes on IS targets in Iraq.

Moreover, France is unapologetic about its secular rules, including its 2004 ban on wearing Muslim headscarves or other religious symbols in public institutions, as well as its criminalisation of hate speech and anti-Semitism. That this does not cover blasphemy, thanks to France’s history of bloody anticlerical struggle which led to the separation of religion and state in 1905, is a point of anger among some Muslims. Some Muslim schoolchildren reportedly refused to observe the minute’s silence for the terror victims last week.

Such points of controversy are readily exploited. The objective of IS, says Gilles Kepel of Sciences-Po university, “is to identify fractures within European society, and strike at them, in order to pit people against each other.” By this logic, he adds, it is not a coincidence that “integrated” Muslims were among last week’s victims.

The great difficulty for French intelligence services, well aware of the radicalisation that takes place in prisons, is working out which potential targets to follow. Hundreds of people have had contact with Mr Beghal, says one police source; less than a third of them can be monitored. And last week’s perpetrators were discreet. Mr Coulibaly was released from prison as recently as March 2014, having been considered a “model inmate”, according to Libération, a newspaper. The tracking of his associates is ongoing; another suspect was arrested on January 12th in Bulgaria.

Even Marine

“It’s not right to talk of an intelligence failure,” says Camille Grand of the Foundation for Strategic Research. France already has robust intelligence and anti-terror powers, and strengthened them with new legislation last year. This turned individual terrorist intent into a criminal offence (previously the law required “association” with others); made it possible to confiscate passports of suspects trying to leave France if there is “serious reason” to suspect terrorist activity; and criminalised the condoning of terrorism. Mr Valls now promises to reinforce intelligence co-operation, and give services the “necessary means” to do their job. He has announced plans to isolate convicted jihadists in jail.

For now, French politicians have managed to keep up a spirit of national unity. Left and right broke into a rendition of “La Marseillaise” after Mr Valls’s speech—the first time that has happened since 1918. Mr Hollande, previously the most unpopular president under the Fifth Republic, is likely to be strengthened. He went straight to Charlie Hebdo on the day; he has handled the aftermath with dignity. Mr Valls and his interior minister, Bernard Cazeneuve may also see their stature grow.

Yet the longer-run beneficiary is more likely to be Marine Le Pen, leader of the populist National Front. She has thrived on warnings about “Islamification”, and came top in last year’s elections for the European Parliament. After the terror attacks, she made an almost-statesmanlike declaration, urging the French not to confuse Islam with radicalism.

The left has not always taken an uncompromising stand towards radicalised Islam nor criminality in the banlieues. Mr Boutih, the Socialist deputy, this week accused local Socialist leaders of ignoring “gangsters and Islamo-Nazis” in order to secure calm in the banlieues. The harsh reality is that, however uplifting the outpouring of solidarity, Ms Le Pen’s supporters will be quietly drawing their own conclusions about France and Islam.