It is hard to convey quite how badly Donald Trump's speech to the United Nations was received in Brussels. The President had one theme to hammer home: that the world would be better off if it was made up of "strong sovereign nations."

In the EU, where the ruling doctrine is that national sovereignty is both irrational and regrettable, Trump's anti-globalism went down like a cup of cold vomit. The Donald used the world "sovereign" or "sovereignty" 21 times, and you could feel the Eurocrats flinching as he warmed to his theme: "All responsible leaders have an obligation to serve their own citizens, and the nation-state remains the best vehicle for elevating the human condition."

As a matter of historical fact, that observation is hard to argue with. Various ideologies have from time to time claimed to be bigger than the nation-state: Jacobinism, fascism, communism, Islamism. All despised national sovereignty and territorial jurisdiction. All sought to replicate themselves around the globe. All caused untold misery. All were eventually checked by nation-states which, being rooted in genuine affinities, served as secure vessels of freedom.

It was patriotic crowds, waving national flags, that brought down the Soviet tyrannies in 1989. Likewise, though the story is nowadays sometimes distorted, the Allies during the Second World War saw themselves as liberators of nations. Nazism was, after all, a trans-national ideology: The last troops still standing in defense of Berlin in 1945 were the French and Scandinavian soldiers of, respectively, the Charlemagne and Nordica Waffen SS regiments.

The idea that "nationalism causes war" is so deep-rooted in the European Union that it is rarely questioned. In fact, Europe's proportionately most lethal conflict was the Thirty Years War, which emptied parts of what are now Germany and the Czech Republic, pitting people of the same nationality against each other on religious grounds. It was after that dreadful destruction that the concept of national sovereignty was born through the Treaty of Westphalia of 1648, which specified that each state was responsible for its internal affairs. That doctrine hasn't been a panacea, but it has worked better than anything else yet tried.

Patriotism may be a dirty word for Eurocrats, but most of us recognize it as the basis of a workable society. Our patriotism bids us acknowledge an obligation to the people around us. It's why we pay taxes to support strangers, why we accept election results when our candidates lose, and why we obey laws with which we disagree.

The mass movement of peoples we're currently seeing is largely from states that are not based on national loyalties (notably African and Asian countries with arbitrary borders) to states that are. As the aphorist and theologian G.K. Chesterton put it, "Condemning patriotism because it can lead to war is like condemning love because it can lead to murder".

It is true that the U.S., like all great powers, sometimes violates the principle of national independence. It has sponsored regime change abroad. It has launched invasions. Indeed, the logic that President Trump uses to threaten North Korea — that a preemptive strike might be an act of self-defense — would equally justify a pre-emptive North Korean strike against the U.S. State sovereignty, as I say, does not solve all our problems.

It's just that every other system so far tried has made things worse, transferring power from national governments which, in most cases, we can get rid of, to global technocracies which we can't.

If you believe in government of, by and for the people, you need to define which people you mean. Within what unit, in other words, is the democratic process best played out? The only realistic answer is that democracy works best when people feel enough in common with each other to accept government from each other's hands. As Charles de Gaulle put in in a radio broadcast in 1942, "democracy and national sovereignty are the same thing."

Who resists that idea? Mainly the officials who work in the UN, the EU, the International Criminal Court, and other supranational bureaucracies insulated from public opinion. These people, whom John Fonte of the Hudson Institute calls Transnational Progressivists or Tranzis, dislike the nation-state precisely because it gives full expression to the wishes of the majority. Or, to flip it around, they like EU-type oligarchies designed by and for people like them.

Last week, Donald Trump reminded them, in one of their own temples, of how meager and unpopular their doctrine is. No wonder they loathe him.

Dan Hannan is a British Conservative MEP.