In this era of mass and uncontrolled migrant flows, Adam Smith’s 1776 classic on The Wealth of Nations offers insight into the nature of the challenge posed by Islamism. Far from being a mere manual of economics, Smith’s work reveals how competition promotes progress across society and government, and how it created the modern state and the modern international state system.

In the second volume of Wealth of Nations, Smith examines the expense of defense, the first charge on the state. Eying the rise of the professional army, he points out that “such an army, as it can best be maintained by an opulent and civilized nation . . . can alone defend such a nation against the invasion of a poor and barbarous neighbor.” Professionals are superior to roving bands; the arrival, as the result of the competitive pressures within the system, of Western military professionalism put an end to the terror of invasion from the East. Or so Smith argued.

Smith’s treatise is, in part, an extended commentary on the rise, through competition, of the modern state as a defense against disorder. It is precisely because Europe’s nations are no longer modern states that they find responding to Islamism such an intractable problem. The first necessity for any state, as Smith argued, is to be able to control and defend its own borders. But across most of the European Union, the standard of border control is effectively that of its least capable member, i.e. Greece.

This left Europe exposed to the over one million migrants who crossed into the continent in 2015 alone, with incalculable consequences for Europe’s security, prosperity and social fabric. The repatriation deal that the EU has cut with Turkey, in exchange for concessions on Turkish travel and accession to the EU, is a sign of Europe’s retreat. It is not a new thing for Europe to pay tribute in the Mediterranean: the Barbary States knew something of exacting it too.

If Islamism’s first challenge to Europe is to its uncontrolled borders, the second, and far more serious, is to its society and culture once those borders have been crossed. Over the coming years, we can expect to see all manner of pleas for a unified European approach to combatting Islamism. What we will not see is any serious effort to deprive Islamism of a measure of its ideological legitimacy by defeating it on the ground in the Middle East.

Nor, as my colleague Robin Simcox points out, is there any likelihood that Europe can advance toward the shared-intelligence utopia that European politicians – especially those who want to transfer ever-more power to the EU – invariably called for in the wake of the latest terrorist atrocity. The reasons for this are many, but the central one may be that sharing intelligence requires a sense that both partners are in it together, and the EU has been far more successful in creating an overarching bureaucracy than it has a shared European demos, a body politic common to everyone who lives in Europe.

The EU has, though certainly done its best, in the name of its assault on nationalism, to diminish the separate national identities of Europe. But it is very hard to see how the European nations are supposed to make migrants into citizens, or to advance a positive appeal against Islamism, without the aid of nationalism as a counter-ideology. Europe desperately needs to build loyalties which rise above localism and tribalism. The EU’s most important legacy will likely be the suicidal contribution it has made to the erosion of those national loyalties in precisely the era when they were needed to serve the cause of building liberal, pluralistic, and patriotic European democracies.

The idea that nationalism can be a positive ideology is discredited in Europe, but without it, assimilation rests on the shaky foundations of unmitigated social tolerance and unlimited welfare payments. The experience of Sweden, for one, suggests this is not enough. As Nima Sanandaji points out, it has “gone from being a nation which successfully integrated the foreign born into the labour market, to one where many immigrants are trapped in long-term dependency on benefit payments.” Employment is one of the most effective pathways to assimilation, for the simple reason that it is hard to have a job that does not involve regular contact with people outside your ethnic, cultural, and religious community. So Europe doesn’t just need nationalism: it needs jobs. A large touch of the Smithian free market would not go amiss in Europe, for the further the state departs from the classic duties set out by Smith and moves toward the post-modern ideal of complete social protection, the worse it performs.

The challenge of Islamism comes at a historically awkward time for Europe: this is an era not of nation-making, but of nation-breaking. From Great Britain, to Spain, to Italy, to Belgium, there is palpably more energy being devoted to splitting up existing nation states than there is to building loyalty to them. In any competition with ISIS – which like the EU also views nationalism as an unalloyed negative, wants to dismantle borders, and seeks to create a super-state – the EU looks like the weaker horse, because unlike the EU, ISIS genuinely believes in spreading its values and in the utility of hard power.

True, Europe would always have found dealing with Islamism a difficult proposition, simply because, since the early seventeenth century, it has been primarily a place that people left, not one they emigrated to. It has not been shaped by mass immigration and assimilation. But that is not the end of the burdens imposed by Europe’s history. The decline in Europe’s self-confidence after the Second World War – it is symptomatic, yet startling, that a recent Gallup survey found only 18 percent of Germans, 20 percent of Italians, and 21 percent of Spaniards were willing to fight for their country – and its near-complete secularization means that there has never been a worse time for Europe’s post-modern states to face the challenges that Smith assumed had been conquered.

What can the U.S. do about this? Relatively little, sadly. It could – though there is no sign it will – put greater pressure of all varieties on the promoters of Islamism in the Middle East. It could – though again, there is no sign it will – seek to close the Mediterranean to the human traffickers of the Levant, and thereby eliminate a weapon (and make no mistake about it: mass migration is a weapon) that will be wielded against Europe again and again until it is shown not to work.

Above all, if the fundamental need is for Europe to rebuild modern states that can control their own borders and make their own citizens, the U.S. could stop supporting the forces in Europe – centered in Brussels – that believe that Europe’s future is (and must be) to become ever more post-modern. But as President Obama’s recent intervention in the Brexit referendum in Britain shows, this thought, too, is miles away from becoming U.S. policy.

One of the great strengths and terrible weaknesses of Islamism is that it rejects most of the modern insights – including those of Adam Smith – about the origins of wealth, the nature of military power, and the structure of the limited state and the world it made. Faced with a determined and modern foe, these weaknesses should be crippling, for as Smith recognized, modernity was about mobilizing power in a competitive system. Against a pre-modern movement like Islamism, the power of the modern West should be irresistible. But this assumes that the West is in fact modern. As long as Europe continues to set its face against the modern vision that its own thinkers and statesmen devised, its response to Islamism will continue to be ineffective, piecemeal, belated and riddled with the doubts that belong to those who are certain that they do not know what they know, or who they are.