A nation is either strong or weak. A country is either bravely independent or cravenly beholden. You are either a follower of this school of thought or that one.

Unlike many philosophers and politicians, the German polymath Gottfried Wilhelm Leibniz resisted framing problems as stark oppositions. At the deepest level of reality, he claimed, the world is governed by a ‘universal harmony’ that connects everything to everything. This metaphysical unity does not result from the suppression or removal of difference. Rather, it consists ‘in the proportion of identity to diversity’, Leibniz wrote in 1672. That is, the greater the variety of beings that exist together in a unified way, the greater the harmony among them. So difference is not to be feared or denied, but celebrated. ‘Harmony is, in fact, unity in multiplicity,’ Leibniz thought.

This overarching outlook informed Leibniz’s vision for Europe, as fraught a question in Leibniz’s time as it is in ours. The outbreak of the Protestant Reformation in the early 16th century, more than 100 years before Leibniz’s time, had shattered the consensus that held Christendom together for more than a millennium. The wars of religion that followed were partially resolved in 1648, when a series of treaties known as the Peace of Westphalia reshaped the contours of Central Europe.

Meanwhile, in France, the concept of ‘sovereignty’ was emerging. This was the idea that the state should have supreme political and religious authority over a particular territory, backed up by the sole legitimate exercise of coercive force. State sovereignty superseded the feudal system, in which political control, religious dominion, judicial process and military power were exercised by different actors in respect of multiple, overlapping swaths of territory.

But the rise of the nation-state brought with it a kind of expansionist absolutism, which Leibniz opposed. In France, the ‘Sun King’ Louis XIV had centralised power around his dazzling court in Versailles. He expelled the entire Calvinist community in the name of religious uniformity, and sent his armies to conquer neighbouring territories in order to enlarge the nation’s footprint.

Other European powers took note. To hesitate in emulating this new concentration of power, it appeared, was to condemn one’s country to defeat or annexation. To the West, the Bourbon dynasty strengthened its grip on Europe by claiming the Spanish crown and consolidating its sprawling possessions in Italy, the Low Countries and the Americas. Britain emerged from the anarchy of the civil wars as a single United Kingdom, through the union of the crowns of England and Scotland under Queen Anne in 1707. To the north, Sweden claimed its place as an imperial power in the Baltic world, while to the east and south, the Ottoman Empire pushed its armies as far as Vienna. So the creation of states, and their sweeping assertions of national sovereignty, rapidly became the norm across most of western Europe.

In the shadow of these struggles, Leibniz pondered how it might be possible to maintain harmony within a Europe made up of diverse and semi-independent cities and principalities, with overlapping allegiances to various Christian denominations. He took the contrarian decision to support a much older and more unwieldy structure at the heart of Europe: the Holy Roman Empire.

In an age in which the nation-state was in the ascendant, it was easy to regard the Empire as a hopeless anachronism. A century later, Voltaire scoffed that this once great institution was neither Holy, nor Roman, nor an Empire. It had its roots in the early Middle Ages, when the Frankish king Charlemagne was crowned Emperor by the Pope, bringing together large parts of Western and Central Europe under one banner.

By 1648, the Empire was loosely ruled by the Habsburgs from Vienna, and had lost significant portions of its former territory. Yet it remained the only major political entity in Europe in which all three main Christian confessions – Catholic, Lutheran and Calvinist – were not merely tolerated as minorities, but legally guaranteed the right to practise their religion with the full protection of the law.

Some regarded the Empire as a ‘multi-headed monster’, to use the words of the German historian and political theorist Samuel Pufendorf. But for Leibniz, the Empire remained more desirable than confessionally homogenous nations. His was a federal ideal, a ‘composite state’ that combined particularistic geographical sovereignty with a different kind of authority for the organism as a whole. Princes, with various religious affiliations, would enjoy ‘supremacy’ in their own territories, but could come together in a supra-national entity that would take care of the general welfare of the Empire. In this way, sovereignty could be linked to different spheres of activity, depending on whether the issue concerned the special welfare of a territory or the wellbeing of the Empire. Decisions could be taken by a federal council, endowed with a federal army and a federal treasury.

This close allegiance of semi-independent principalities was, for Leibniz, also the best way to protect the autonomy of smaller territories from threats by their larger and more aggressive neighbours. Leibniz believed his pluralistic Europe could keep rapacious and absolutist impulses in check. It would create an equilibrium between different powers, promote a shared political agenda for the ‘common good’, and preserve the autonomy and diversity of communities small, medium and large.

But Leibniz’s notion of ‘unity in multiplicity’ never achieved consensus during his lifetime. He wrote repeatedly to the Holy Roman Emperor, offering to codify his ideals for the Empire, but his detailed memos and proposals did not meet with success. A century after Leibniz’s death on 14 November 1716, the Empire itself was defeated by the army of Napoleon in 1806, ushering in a fresh era of untrammelled nationalism.

Partly as a consequence, cosmopolitan ideas waned. Europeans for generations came to identify themselves in contrast to one another, contestants in a zero-sum game for dominance, creating the conditions for two brutal world wars. For a few brief decades after the Second World War, Leibniz’s internationalist vision seemed to take hold among the nations that would cohere into the European Union (EU). But centuries of identity formation have imprinted the nationalist impulse on most European cultures – and the crises of contemporary Europe have been enough to reawaken it.

With the UK’s departure, a new Voltaire might say that the EU is neither fully European nor a union. The balance of power between the federalist and absolutist visions of sovereignty is palpably shifting. But the Leibnizian view retains its passionate supporters. Leibniz’s dream of a political ‘unity in multiplicity’ aimed at the ‘common good’ remains for many a far more compelling ideal than retreat into competing nation-states.