“If you tell a typical Frenchman that third-generation immigrants in the banlieues don’t have running water—if you tell him that many are illiterate and have no hope of finding a job or being a productive member of French society—he simply won’t believe you,” says Akbar Ahmed, a former Pakistani ambassador to the UK and now a professor of Islamic studies at American University in Washington, DC. “He’ll insist that they’re French citizens with the same opportunities as everyone else.”

Ahmed and his team are working on the first comprehensive, continent-wide study of Muslim communities in Europe. “Thirty percent of the population of Marseilles are immigrants,” he says. “They have no central mosque, they live in ghettos and most are unemployed. They don’t have decent schools. And exactly the same conditions exist in Belgium. They have very poor education, very poor lifetime prospects. Social rejection is the norm—they are not considered part of the fabric of their society—and this is enough to drive any community up a wall.”

Up a wall, and for some, into the hands of radical Islamism.

The contrast between Muslim communities in Europe and the United States is stark and telling. American Muslims tend to be prosperous, well-educated and deeply invested in their country. As a group, they’re politically active and comfortable living in a pluralistic society, and there’s no evidence that they embrace extreme religious views or commit acts of violence at a higher rate than Christians or Jews.

But in Europe, life on the economic and social margins creates fertile ground for radicalization. None of this is news to sociologists, or unknown to counter-terrorism experts on either side of the Atlantic. But European politics constrain the conversation. Ultra-nationalist parties are on the rise across the continent, and political leaders who call for addressing the profound social problems that are fueling Europe’s home-grown extremism are accused of being “soft on terrorism,” or “coddling extremists.”

As a result, there’s a lot of focus on radical theology, and not enough on the conditions that allow it to take hold. European law enforcement, says Ahmed, “are analyzing this through the prism of theology. They’re studying the Koran for explanations, but what we’re seeing is nothing more than disaffected, disenchanted, illiterate young people who are not adjusting to society. Look at these young idiots who are blowing things up—they’re looking at ISIS videos with a beer in one hand and a joint in the other.”

In a telling incident in 2014, two Britons who pleaded guilty to terror charges purchased a copy of Islam for Dummies before traveling to Syria to fight with ISIS. Olivier Roy, a professor at the European University Institute in Florence, Italy, and the author of Globalized Islam, writes that what Europe faces today “isn’t about religion or politics,” it’s a “youth revolt.” The problem, Roy argues, is “not the radicalization of Islam, but the Islamization of radicalism.”

The unemployment rate among Muslim immigrants in Europe is estimated to be as high as 40 percent, depending on the country. A report last year by the British think tank Demos found that Muslims in the UK “are disproportionately likely to experience poverty,” “lack the networks, social capital and soft skills that can facilitate access” to the middle class and face “discrimination in recruitment processes.”

In a 2010 study led by David Laitin, a Stanford University political scientist, fake résumés were submitted to French businesses with names that suggested the applicants were either Christian or Muslim immigrants from Senegal. Their qualifications were equal, but the resumes with a typically Christian name listed past work with a Catholic relief organization and the ones with the Muslim name cited similar experience with an Islamic charity. Even though both hypothetical applicants were immigrants from the same country, the ostensible Christian was two and a half times more likely to be called in for an interview. Laitin’s team also “found that second-generation Muslim households made about 400 euros less a month than ethnically and socioeconomically similar Christian families,” according to a press release.

Even a tiny fraction of people within these marginalized communities can wreak havoc. Jean-Charles Brisard, a French terrorism expert and author of The New Face of Al-Qaeda, tells The Nation that Western Europe faces as many as 6,500 home-grown extremists out of a population that the Pew Research Center estimates at 19 million. In many European countries, prisons have basically become factories that manufacture extremists. There’s a pipeline that begins with petty crimes in immigrant slums, runs through the judicial system, and leads to Islamist terror groups. This has been a serious problem for a long time. But Michael Birnbaum reported last year for The Washington Post that in France, despite the fact that there are “Osama bin Laden posters hanging on inmates’ walls,” authorities are just beginning to tackle the issue, and their “efforts [remain] minuscule compared with the scope of the problem.”

And identifying individuals within these communities who may be at risk of radicalization isn’t easy. Matt Apuzzo recently reported for The New York Times that, “despite millions of dollars of government-sponsored research…there is still nothing close to a consensus on why someone becomes a terrorist.”

Security failures have been a real problem—police and intelligence agencies have repeatedly failed to interrupt plots by individuals who were on law-enforcement’s radars. “The security services are overwhelmed,” says Brisard. “All of the countries don’t feel the same level of threat, and the European Union has been unable to provide the EU members with the tools they’ve been asking for for years.” Information sharing between national police forces continues to be a problem for the EU, and some member states are opposed to the idea of tighter border controls between European countries. Efforts to create a uniform database of air travelers’ information and to track potential terrorists’ electronic communications have been stymied for years because of concerns about civil liberties.

But for all of the focus on security, it’s important to understand that improvements in this area alone won’t solve the problem. There will never be enough personnel to surveil every disaffected young person who might pose a threat, and short of turning Europe into a massive police state, it’s impossible to harden every soft target—today, troops surround the Louvre, but there aren’t enough soldiers to guard every restaurant and disco in the EU. Brussels was under the highest state of alert when four individuals successfully attacked an airport, which are among the most secure targets in any country.

In an open society, this isn’t a problem that can be solved with a European Patriot Act—a proposal that has little political support—which is all the more reason to address the problems by preventing radicalization before it starts. “The most fundamental question is, How do we create conditions for individuals not to be radicalized?” says Brisard. “How do we identify people at risk? The UK has been trying to implement some pilot programs locally, but unfortunately, on this key issue, these small local programs have not been reproduced at the national level.” Most of those programs are symbolic. Interfaith leaders visit community centers in marginalized communities and organize sporting events for young people. They promise greater cooperation between officials and local community leaders, take some pictures, and then go home.

For Akbar Ahmed and others, broken communities are the source of the problem, and only by healing them can the problem be solved. ISIS is hemorrhaging territory in Iraq and Syria, and is likely to be defeated in the coming years, but Europe will continue to suffer serious terror attacks until its elites face up to what’s causing a small but deadly fraction of its citizens to lash out with violence. “When we talk of long-term solutions, that means education, jobs and investing in the communities,” he says. “And without those long-term solutions, I fear the situation is only going to get worse.”