But when the two inmates talked about life outside prison, their own optimism faded. France, they said, seemed to be building toward a confrontation with Islam. It was the same in all of Europe, they said, and even in the United States (they made clear that they spent much of their time watching TV news). For young men from the French banlieues, assimilation and radicalization appeared to be two sides of a coin that never fell in their favor. “All the profiling, the discrimination, it adds up,” the North African said. He continued, referring to the numeric code for France’s most notorious banlieue: “Ninety-three — if that’s on your C.V., it’s hard to get a job. There’s frustration among the young. That becomes hate, and hate becomes radicalism.”

Just before we left, I asked the North African whether he expected the recent wave of terrorist attacks in France to continue. This was just after the arrest of several terrorist cells, and two months before a machete-wielding jihadist attacked guards near the Louvre. He gave me a somber look. “This is just the beginning,” he said.

Many French Muslims, even in the banlieues, seem to agree with Kepel that the core problem is the spread of more aggressive forms of Islam. In Mantes-la-Jolie, I met a 50-year-old shop owner who told me he believed that by the 1990s, the situation was improving, and “France was ready to assimilate its Maghrebins,” or North Africans. What changed, he said, was not primarily the advances of the racist National Front, but the spread of Gulf-sponsored Salafism. The man described this phenomenon in terms almost identical to Kepel’s. He told me he had been shaken by some of his encounters with young local men, many of them poorly educated and delinquent but full of religious rage. Sometimes, he said, men came into the shop and called him an infidel, in front of other customers. The shopkeeper asked me not to use his name, because he feared reprisals from the Salafis. “Now, people seem almost not to want assimilation,” he said. “They have taken on a religion that has nothing to do with their own origins. It’s a lost generation.”

Naima M’Faddel, who is one of France’s relatively few Muslim elected officials as a deputy mayor in Dreaux, told me she remembered the exact moment when she became aware of Salafism. As a girl in the 1980s, she once answered the door to find herself facing a bearded man in a djellaba, who quickly turned his gaze to the ground so as to avoid the sin of looking at an unveiled female. “Is the master of the house here?” he said. She replied that he was not. The man said, “Tell him he should go to the mosque.” M’Faddel, who grew up in a mixed neighborhood of European and North African immigrants, said her family witnessed the Islamist influence becoming dominant as the demography shifted. “My impression is that the majority of Arab Muslims in the banlieues have been penetrated by Salafist thinking,” she told me. M’Faddel said French racism and elitism were certainly problems, but she also placed a lot of blame on the political left for “infantilizing” Muslims and not trying hard enough to integrate them as citizens.

Another passionate enemy of the Islamist trend is France’s most distinguished Islamic intellectual, the Moroccan-born thinker Tareq Oubrou. Oubrou leads a mosque in Bordeaux and promotes a discreet practice of religion that is fully consistent with laïcité. He says beards, head scarves and other public displays of religiosity are incidental to Islam. We spoke in the library of his home, with high shelves of Arabic and French scholarship above us. Oubrou told me cheerfully that political Islam had been a “total failure” and that Islam in general was in need of a fundamental rethinking, so that people could stop “trying to turn themselves into seventh-century Arabs.” The Quran, he said, was a “point of departure and not a point of arrival.” His mosque, a few blocks from the train station in downtown Bordeaux, is so discreet that I almost missed it. There are no minarets, no grand entrance. The only giveaway was the group of gun-toting French soldiers who stand guard at prayer times. Oubrou’s opinions have earned him repeated death threats.

I recently spoke with a young, highly trained French Muslim doctor, who wears a head scarf and who was deeply frustrated that she could not do so at the public hospital where she worked in France. She told me she went to Oubrou to seek his advice. He asked her about the nature of her work in the hospital, and she described it to him. He then gave her his counsel: Her work in the hospital appeared to be saving lives, which was far more important — and indeed, more Islamic — than anything she might want to wear on her head. I found this answer impressive, but the doctor was not convinced. She decided soon afterward to move to Britain, where she now works in a hospital that allows her to wear the head scarf wherever she likes.

The Muslim doctor’s choice suggests a tacit critique of France, and it squares with something I heard from many young French people of North African background: France is simply out of step with a more globalized world. Some academics agree. “It is not France’s traditions that caused this problem, and France’s traditions may not be the answer,” says David Bell, a historian at Princeton. “Laïcité may not be the best basis for integrating these very different populations. The debates there are dominated by intellectuals who are overly attached to their own history.”

When I last saw Kepel in his office, I asked him about the accusation that he had become a kind of neo-Gaullist defender of French traditions. He scoffed a bit, saying it was the circumstances that had changed, not him. “The big issue is to think about what has happened to the country — 239 dead in 18 months,” he said, using his own count. “It is unprecedented on French soil.” He said he saw his role as offering facts about what led to those tragedies, not offering solutions. Some of those facts were uncomfortable, and some people — including officials in places like Mantes-la-Jolie and Trappes, with their hard-core Islamist enclaves — were unwilling to face them. It was up to other people, he said, to find ways to heal France’s wounds. Kepel reminded me that his career was mostly behind him and that he had nothing to lose. “It may be that I’m influenced by my background as the grandson of an assimilated Frenchman,” he added. “But basically, I’m just an Orientalist with cold blood and thick skin.”