The British vote in June to leave the European Union brought the long-simmering revival of nationalism to a boil. Passions aroused by the 2008 economic crisis, anger over the indiscriminate admission of nearly a million mostly male Middle Eastern refugees in 2015, and the carnage of the terrorist attacks in Paris, Brussels, and Nice have intensified the resentment of many Europeans. They have been further stoked by the high-handed policies of what many see as an over-privileged, over-bureaucratized, undemocratic E.U. elite. National identities that were supposed to have been marginalized in favor of a transnational government of technocrats have returned in surging populist and nationalist parties such as the UK Independence Party, France’s National Front, the Alternative for Germany, True Finns, Jobbik in Hungary, Lega Nord in Italy, Sweden Democrats, and many others.

In the United States, the surprising insurgency candidacies of Vermont Senator Bernie Sanders and businessman Donald Trump reflected a similar return of anti-globalist sentiment and nationalist populism on both the left and the right. Both candidates railed against trade deals like the Trans-Pacific Partnership, which is currently awaiting ratification. Both also criticized European NATO members for not meeting their financial obligations and relying on the United States to foot most of the bill for NATO operations. Donald Trump has freely used slogans such as Make America Great Again and America First, while Sanders railed against the elite “one percent” who unfairly benefit from a globalized economy.

This resurgence of nationalist populism in Europe and the United States is a challenge to the internationalist order that is now more than a century old. It was expressed in Immanuel Kant’s 1795 essay “Perpetual Peace,” which envisioned a “federation of free states” in a “pacific alliance” that would “terminate all wars” and create “perpetual peace.” Such optimism was nourished for Kant by the “uniformity of the progress of the human mind,” a growing convergence of peoples towards the Western model of rule by rational laws rather than by tradition or religion. More practically, new 19th-century technologies like the railroad, telegraph, and steamship brought the world’s peoples closer together and bound them by trade, creating a “harmony of interests,” in Adam Smith’s phrase, that made cooperation and similarity more efficient and beneficial than conflict and dissonance.

Given this global “uniformity,” enlightened reason would increasingly replace conflicting traditions, religions, and cultures with more rational international institutions that recognize democracy, human rights, tolerance, and other Western ideals. These multinational organizations, covenants, and treaties would turn force into a costlier and less effective means of adjudicating conflicting national interests than international diplomacy. The Preamble to the First Hague Convention, which aimed to limit certain kinds of armaments, in 1899 stated its aims as “the maintenance of the general peace” and the “friendly settlement of international disputes,” based on the “solidarity which unites the members of the society of civilized nations” and their desire to extend the “empire of law” in order to further the “appreciation of international justice.”

Despite the repudiation of international “solidarity” by the slaughter of World War I, more covenants, treaties, and institutions continued to be created to fulfill the dream of transnational governance. The League of Nations (1920) and the International Court of Arbitration (1923); multinational treaties like Locarno (1925) and the Kellogg-Briand Pact (1928), which asserted that the “settlement or solution of all disputes and conflicts” would “never be sought except by pacific means,” and was signed and then violated by all three of the Axis Powers; and numerous ineffective arms reduction treaties all testify to the powerful hold of idealistic internationalism on foreign policy and inter-state relations.

And they demonstrate the futility of such “parchment barriers,” to use James Madison’s phrase, in preventing the massive death and destruction of World War II. Yet despite that lesson, such institutions have given rise to a host of political and economic transnational organizations such as the United Nations, the International Court of Justice, the International Criminal Court, the European Union, the International Monetary Fund, the General Agreement on Tariffs and Trade, and the World Bank, just to name the most prominent.

The two World Wars, however, and the continuous global violence from invasions, civil wars, revolutions, ethnic cleansing, and genocide since then, point to the fundamental flaw of internationalism. All these transnational institutions depend on sovereign states for their creation, implementation, management, and enforcement. The notion of national sovereignty is over three centuries old, codified in the Treaty of Westphalia (1648) and further refined in the Congress of Vienna (1815), which sought to keep the peace through a balance of sovereign national powers. Given this framework, international treaties can exist only by the consent of sovereign nations, and thus can be abrogated by any nation depending on calculations of its national interests, which necessarily conflict at times with those of other nations. To predicate the basis of a treaty on anything other than national self-interest­––such as a presumed “progress of the human mind” or shared “international norms and customs” –– is a chimera. As the late jurist Robert Bork has written, history shows that violence and aggression are the dominant “customs” of nations and peoples.

This clash between transnational ideals and the frequent zero-sum interests of individual states has been constant for over a century. Institutions that supposedly serve global interests end up being dominated by the more powerful states that use them for their own interests, as the history of the U.N. Security Council, hostage to the veto power of the five permanent members, demonstrates. For example, Russia recently used its Security Council veto to block a resolution calling on Russia to stop bombing Aleppo and violating “international norms and customs” about not killing civilians. International conventions and covenants can be regularly violated or routinely ignored, and such violations rarely lead to condign punishment. Treaty rules are continually broken, such as when E.U. ministers bailed out Greece during the financial crisis, a violation of the Lisbon Treaty’s Article 125 prohibiting financial bailouts of member states; or like when member states consistently ignore the 1998 Stability and Growth Pact’s rule that government debt cannot exceed 60 percent of GDP. The E.U.’s average in 2015 was 90 percent.

This behavior should not be surprising, for as George Washington said, “It is a maxim founded on the universal experience of mankind, that no nation can be trusted farther than it is bounded by its interests.” Once a treaty or covenant ceases to serve a nation’s interests, it will be violated or simply abandoned, as when North Korea withdrew from the Nuclear Non-Proliferation Treaty in 2003 when membership no longer served its purposes.

For many who believe in internationalism and its ability to keep the peace, the way to make it more efficient is to reduce the power and weaken the sovereignty of nations by ceding both to transnational institutions. Particularly after World War II, this goal was accompanied in part by blaming the excesses of fascism and Nazism on nationalism. To prevent similar bloodshed, the argument still goes, national sovereignty must be checked and limited by larger multilateral organizations. Nationalism has become a pejorative term, patriotism a dangerous sentiment prone to xenophobia and intolerance. We saw this assumption in the criticism of Trump’s campaign slogan America First, a phrase evoking the 1940 isolationist movement of the same name that lobbied against U.S. participation in European conflicts, and sometimes indulged in anti-Semitic rhetoric.

But to blame nationalism for the horrors of fascism and Nazism is to blame a healthy cell for becoming cancerous. Moreover, it ignores the critical role of the nation-state as the foundation of modern consensual government and political freedom. The nation-state allows large groups of people to create a solidarity that binds them together and gives them a common destiny. Without this shared identity and values, this affection for their own way of life and for those who share it with them, people are left rootless and fragmented into niche identities, connected now only by consumerism, popular culture, and sporting events. And such a Balkanized society is vulnerable to its more cohesive rivals and enemies. As historian Michael Burleigh has written, “Can a society survive that is not the object of commitments to its core values or a focus for the fundamental identities for all its members?” No one will risk his life or die for the United Nations, the European Union, or the World Bank.

British Prime Minister Theresa May said recently, “If you believe you are a citizen of the world, you are a citizen of nowhere.” Cosmopolitanism is viable only for a tiny elite of businessmen, politicians, entertainers, academics, and professional media. The vast majority of people live in local communities rooted in a specific landscape, language, beliefs, histories, and customs, in a nation that needs secure borders and strict qualifications for immigration and citizenship in order to protect its identity and security. The nation, properly understood, makes its citizens who they are and gives their civil and political lives meaning. To demonize the citizens who cherish those identities as bigots or xenophobes is to deny their very selves. “It is inhuman,” the French philosopher Alain Finkielkraut writes, “to define man by blood and soil, but no less inhuman to leave him stumbling through life with the terrestrial foundations of his existence taken out from under him.”

The current resurgence of populist nationalism in the United States and Europe reflects the pushback against these long-held dogmas of transnationalism, and resistance to the denigration of national identities. In the United States, Donald Trump’s victory over Hillary Clinton in the presidential contest confirms that for now at least, populist nationalism has deep and wide support. In Europe, national elections during the next year will reveal just how widespread and vigorous this resistance is beyond America. Facing global threats from rivals and enemies passionate about their own national or religious identities, the interests and security of the West will be better protected if its citizens are allowed to express without recriminations their national pride and autonomy.