The prevailing view seems to be that the idea of Europe as a cultural, political, and even economic institution is under threat. What threatens Europe? A glib response would be: "It's the UK, stupid!" We will find more than a grain of truth in this response. The UK straddles Europe's margins – at once a major economy dependent on European trade, adapting its legal institutions to a transnational European legal order where EU law has direct effect; but refusing the common currency, and resisting further political integration. But the deeper threat to Europe is the very thing that it was designed to overcome – nationalism as the root of political unity and commonality.

The European project was inspired by the injunction "never again". Never again would European nations allow virulent and competitive nationalism to tear them apart as they had done in two disastrous wars. Never again would the fate of minorities be left to national parliaments, and racist and populist sentiments. According to Europe's founding myth, a new commonality, beginning with a European common market, respect for democratic institutions, human rights, and the rule of law, would define the European project.

These lofty ambitions were of course a far cry from the xenophobia and racism experienced by many migrant and refugee communities in Europe after the second world war. Nonetheless they provided a juridical framework within which discrimination was contested, and a liberal-democratic social project of tolerance and diversity was advanced. This was facilitated by the highly integrationist jurisprudence of the European court of justice in the early 1960s.

The impact of juridical unification was starkly brought home to Margaret Thatcher's government when a British court granted an injunction to stop the application of the Merchant Shipping Act 1988 (MSA) while its compatibility with European laws was tested. The MSA had sought to introduce a qualifier of nationality for fishing licenses in UK waters. Spanish fisherman challenged the legislation. The courts decided that nationality would not be allowed to interfere with the freedom of inter-European trade and commerce.

What, then, are the perceived threats to this new European order? The greatest perceived threat has been from the so-called "return of religion". Recall the furore in February 2008 when the archbishop of Canterbury, Dr Rowan Williams, gave a highly nuanced speech about the need to be open to the application of sharia law in certain limited circumstances. It was a speech explicitly addressed to lawyers, with a sophisticated analysis of particular laws and the theories on which they are based.

The irresponsible silence of the legal community when the archbishop came under attack was a low point that should shame all lawyers. He was only articulating what is currently a fact – that Christian, Jewish, and Islamic law does play a significant role in people's lives, and regulates family life and marriages in particular. Moreover he noted that a sense of wider religious belonging, such as with Muslims and the umma, coexists with citizenship in many nation states. Where there is an inconsistency between religious law and the putatively secular "law of the land", the latter would usually prevail. This is not different from a range of other jurisdictions such as India and South Africa where customary and state law coexist. Political and religious plurality is consistent. Citizenship does not mean that the citizen need accept "civil religion" alone. But such discussions about the return of religion are a distraction when nationalism is on the march in Europe again.

I would argue that we have more to fear from nationalism than from religion. And the paradox of European integration is that closer institutional ties with Europe, the principle of subsidiarity, and the apparent obsolescence of the modern nation-state are the calling cards of resurgent nationalism. The Scottish National party's white paper on Scottish independence carries this headline quote from the Dundee summer cabinet of 2009: "In my view the most cogent argument for independence for Scotland is the need for separate representation at the European Union." Scottish independence looms large as a major constitutional issue facing the UK.

At the heart of the European project, in Belgium, the viability of the nation-state that is the home of Europe's capital is now in question. As Nationaal Vlaamse Alliantie (National Flemish Alliance), a democratic nationalist party, put it in its programme for the European elections in 2004: "Europe became of essential importance for Flanders. The future of our people is more and more situated in Europe. From now on our identity will be projected in a European framework."

So what's the problem, some might ask? What does it matter if the constituent elements of the European Union are drawn from Scotland, England and Wales rather than the UK; from Flemish, Catalan, and Basque nations rather than Belgium or Spain? It matters a great deal, as the nation-state is not just a neutral differentiation. While the UK, Spain, Germany, Italy etc are the unions of previously rival regions, principalities, or remnants of imperial formations, they are also the sedimentation of decomposed differences. These nation-states have evolved into commonwealths where national differentiation is not the only unifying characteristic. Do we want a Europe where the Flemish cannot bear to hear French spoken within earshot, let alone Urdu? Will a Scotland with a higher per capita GDP be more open to foreigners or more likely to protect its relative affluence?

The neo-nationalists will try to sell nationalism to us in the name of economics, better corporate tax rates, greener government, and better energy policies. Here is what the SNP white paper on independence has to say about the Basque country: "[Basque] GDP per capita is approximately 30% higher than the Spanish average, and at the start of 2009 the Basque country government enjoyed a higher credit rating than the Spanish federal government." A coalition of better credit raters is not one of the grander political ideas. But this banality signals a radical reversal of what the European project envisioned, albeit in the name of closer ties to Europe.