In the wake of the Brussels attack, a number of European voices have called for closing the continent’s borders to Muslim migrants. There are at least some Americans saying the same thing. In a recent Fox News interview, Donald Trump warned that Tuesday’s violence in Brussels was “just the beginning” and that “at this point, we cannot allow these people to come into our country.” One complicating factor here is that it appears that the perpetrators of this attack, as well as the recent terror attack in Paris, are by and large not Muslim migrants. Rather, they are the children of Muslim migrants, born and raised in Europe. Defenders of large-scale Muslim migration will insist that barring new migrants would have absolutely no effect on the native-born women and men living in Europe’s impoverished Muslim ghettos. But is that really true?

How you feel about Muslim migration depends, to a large degree, on your moral instincts. Consider one of Trump’s more cutting remarks in his Fox interview: “That’s the problem with the liberal policies of this country and this world, it’s acting like it’s our fault. It’s not our fault, OK, it’s not our fault. It’s their fault.” Those who believe Europe ought to welcome Muslim migrants in large numbers might reply that it is our fault, at least in part. You could reasonably argue that the chaos spreading throughout the Arab world is a consequence of the Iraq invasion and the bloody conflicts that have followed or that the market democracies that have profited from capitalist exploitation are to blame for poverty and violence everywhere. It all depends on your particular ideological bent.

Whether or not you believe that the miseries that have been visited upon people in Syria and elsewhere are our fault, realistically our willingness to do the “right thing”—let’s leave aside for now what “the right thing” is—depends on how easy it is to do the right thing. That is why advocates of mass refugee migration often downplay how difficult and expensive it is to integrate impoverished people from very different cultures into modern urban societies. If you tell people that accepting refugees will cost nothing because the Vietnamese boat people were quite successful in the 1970s and 1980s, you will have many takers. Tell them that today’s refugees from Syria, Iraq, and elsewhere in the Muslim world will need a lot more help than those of earlier eras, in large part because the global economy has been really hard on people with limited skills, and the prospect sounds less appealing. What if you then added the possibility that the native-born children of these migrants would themselves have a desperately hard time in the decades to come and that some number of them would come to resent the countries that offered their parents refuge? The more realistic we are about these costs, the more people are likely to balk.

Back in October, Daniel Byman, a leading expert on counterterrorism and a Slate contributor, wrote one of the smartest, sanest articles I’ve come across on the relationship between Muslim migration and Europe’s terrorism problem. I should stress that Byman believes that European democracies ought to accept Muslim migrants in large numbers. But what I appreciate most about his article is that he offers a balanced account of what it will take to do so successfully. According to Byman, Europe’s terrorism problem stems from the fact that large numbers of European Muslims feel a deep sense of anger and disaffection, which has created the conditions for radicalization. New refugees arriving in Europe are often grateful to have been offered sanctuary. But if European governments fail to provide them with the resources they need to flourish, there is a danger they will fall prey to radicals. “If they cannot be integrated into local communities,” Byman writes, “then they risk perpetuating, or even exacerbating, the tensions between Muslim and non-Muslim communities in Europe.”

Essentially, Byman is arguing that if Europeans accept large numbers of Muslim refugees, they’d better be prepared to provide Muslim communities with the services they need, from policing to language instruction to medical care, to ensure that these immigrants become full members of their host societies. If they don’t make a full commitment to integrating these new residents and their native-born offspring, they’ll be in for trouble. There’s more to integrating refugees than just providing them with services, as Byman would acknowledge. Ordinary Europeans must welcome their new Muslim neighbors with open arms and not discriminate against them or otherwise make them feel ill at ease. If we can guarantee that your average white Belgian will treat your average brown Belgian with respect and affection and that Brussels will become a wonderland of interethnic harmony, all will (hopefully) be well.

Byman is telling us that if European societies are warm and welcoming to traumatized Muslim migrants and provide them with various services, there is a good chance that these migrants will not grow dangerously resentful. Fair enough. But at some point you have to wonder: What’s in it for the Europeans? Is there some positive case for welcoming large numbers of people who are at risk of becoming radicalized?

Keep in mind that services like policing, education, and medical care are labor-intensive. That is, they require large numbers of skilled professionals to devote a great deal of time and effort to doing difficult jobs, and skilled professionals command far higher wages in affluent countries like Belgium than they do in poorer countries, like Syria or Iraq. Working migrants pay taxes, but many migrants find it difficult to work, particularly those who are not literate in the language of their host countries. Those who are literate often lack the skills and the social networks they need to find remunerative employment. This doesn’t make them bad people, of course. It does mean that many migrants receive a great deal of expensive taxpayer-financed assistance while at the same time paying relatively little in taxes.

Recently, Joakim Ruist, a research fellow at the University of Gothenburg, analyzed the fiscal cost of refugee migrants in Sweden. He carefully compared the revenues generated by refugee migrants in 2007, before the recent migrant crisis, and the fiscal costs of providing them with various services. That year, refugee migrants represented 5.1 percent of Sweden’s population, accounted for 5.6 percent of total public spending, and contributed 3.4 percent of total public revenue. This is hardly surprising, given that refugee migrants earn such low incomes when they earn any income at all. Overall, Ruist finds that Sweden’s nonrefugee population redistributed 1 percent of gross domestic product to its refugee population in 2007, four-fifths of which reflects lower revenue levels from refugees, and one-fifth of which reflects higher per capita costs for providing for refugees. Ruist estimates that the cost of Sweden’s refugee population has now increased to 1.35 percent of GDP. Other analysts, like Tino Sanandaji of the Stockholm School of Economics, have suggested that the net cost is substantially higher than Ruist believes it be. But let’s assume for now that Ruist is correct. He argues that this net cost is pretty modest, and that the economic burden of providing for refugees should not deter Europeans from welcoming more of them.

There’s another way of looking at this fiscal cost, however. As small as it sounds, 1.35 percent of GDP is a huge amount of money in an affluent country—approximately $8.1 billion in Sweden. That brings us back to the question of how large-scale migration affects local populations, including second-generation immigrants. That level of spending could finance a dramatic increase in overseas development assistance or services for the second-generation children of migrants, who often find themselves living in bleak, underfinanced housing estates and attending substandard schools. What if Belgium and other European democracies decided to do more to integrate their large second-generation Muslim populations before deciding to bring in large new refugee populations? Or to put it another way: What if these societies decided to deal with the problems they already have at home before inviting new people through the door?

Earlier this month, Foreign Policy’s Sumi Somaskanda reported that established immigrant communities in Germany—among them second- and third-generation Germans of Turkish, Arab, or African origin—are in many cases quite skeptical about the wisdom of admitting refugees in large numbers. The descendants of Turkish migrants who came to Germany to work menial jobs often find themselves on the bottom rungs of German society, and many of them see new arrivals as competition for a dwindling number of low-skill jobs, subsidized housing, and the other benefits that they depend on to lead dignified lives. These ethnic Germans understand that life on the margins of one of Europe’s richest democracies can be brutal and that even the most progressive government can’t make discrimination vanish. We’d all like for people to be open-minded, loving, and tolerant toward people who look and sound different from them. But if stamping out bigotry from every European heart is the only way to ensure that today’s Muslim migrants don’t give rise to alienated second-generation communities, we’re in for a rude awakening.

I do not believe that Europe’s democracies, or for that matter the U.S., ought to shut down all Muslim migration. But if we don’t want today’s Muslim migrants to raise the next generation’s native-born radicals, we ought to limit migration to those who are most likely to flourish in Western societies: people with the language skills, the education, and the experiences that will allow them to integrate successfully, even if these societies don’t become discrimination-free utopias. This is not because migrants who don’t have these qualities aren’t good people. It is because Belgium and other Western democracies are not enlightened, generous, or otherwise perfect enough to behave in such a saintly manner.

Daniel Byman put it best:

The worst thing European countries could do would be to invite in hundreds of thousands of refugees in a fit of sympathy and then lose interest or become hostile, starving them of support and vilifying them politically, creating a self-fulfilling prophecy.

I agree with him. All evidence to date suggests that when Western democracies invite poor Muslim migrants, that vicious cycle of sympathy, indifference, and hostility is almost guaranteed to follow.

Read more of Slate’s coverage of the Brussels terror attacks.