It was not long ago that all right-thinking people believed in globalization as both an irresistible fact and a goal to be earnestly sought and promoted.

Globalization would feed the hungry, cure the sick, teach the ignorant, and bring with it the conditions of enduring peace. We had, it seemed, reached an era in which narrow identities and rivalries were transcended by a universalism that was increasingly embraced by more and more of the world. This universalism embraced nearly borderless free markets, the free movement of capital and labor, and a commitment to liberal democratic political institutions.

Certainly aspects of globalization did have extraordinary effects: Tens of millions of people were lifted out of dire poverty in China and India. Information began to move at blinding speeds, spurring innovation and real progress in many areas of human life.

It seems like a long time ago now.

Many of the same voices in the mass media and the academy are now constantly talking about the return of nationalism. To be fair, there were always dissenting voices about what one could call “eschatological” globalization. Some pointed in particular to religious and national identity as perennial forces in human affairs that would always push against liberal universalism. Those worries now seem prophetic with the rise, first, of political Islam and, now, a new nationalism.

In the United States, this is identified with the election of Donald Trump, who has at times embraced the label “nationalist.” Just recently, there was a large gathering of journalists, public intellectuals and activists dedicated to the discussion of “national conservatism” in Washington.

The phenomenon is, however, widespread around the world, especially in Europe, where the bloody history of nationalism and the project of European unification made it seem particularly unlikely. The Brexit vote in the U.K. was only the consummation of an emerging sense of national identity that had Prime Minister Theresa May, who actually opposed leaving the European Union, proclaim in a 2016 speech, “If you believe you are a citizen of the world, you are a citizen of nowhere.”

Her predecessor, David Cameron, had previously announced the failure of “multiculturalism,” a view echoed by, of all people, German Chancellor Angela Merkl. Nationalist political parties have since, with varying success, arisen all over Europe.

But the phenomenon is itself global: Vladimir Putin has made Russian nationalism central to the justification of his dictatorship, India just re-elected a Hindu nationalist government, and China pursues the “Chinese Dream” by claiming most of the South and East China Seas and promoting its “Belt and Road Initiative” all over Asia.

In one quite obvious sense, nationalism is at odds with Catholic Christianity. The Catholic faith is by definition universal. Its truth transcends time and space, and the Church itself is by far the world’s oldest and most successful global institution. Jesus Christ is the head of all mankind, and the Christian claim is aimed at every human person. God is the most common good, the final end of all human striving, and the reign of God over the whole world is the true end and consummation of history.

Nevertheless, Catholic teaching has always accepted that there is also a form of imperfect temporal happiness for individual human beings and a temporal common good of all distinct political communities. Grace perfects nature, and it is the nature of human beings that they live in communities. The Aristotelian principle that there is a type of community that is complete — that is, a community that provides all that is necessary for the natural flourishing of human beings — has long been accepted by Christian political theology and the application of that theology in what has developed since Leo XIII as Catholic social doctrine.

While Catholic social doctrine holds that there is a universal common good even of human society, it also famously includes the principle of subsidiarity. That principle protects the agency, the ability to make free deliberate choices, of human beings and of human associations from the family to the nation. It, therefore, prohibits the absorption of persons and groups by monolithic centers of power. Rather, it values the autonomous flourishing of those forms of agency as contributions to the larger common good. Every community has a good, and, while the “complete” or “political” good exercises overall coordination of common life, it recognizes and even aids the autonomous flourishing of smaller groups as perfections of itself. In this it mirrors God’s establishment of free human action as a perfection of his creation.

It is in this context that we should see authoritative teaching on the nation and national identity. The Church has sometimes opposed nationalism when it was at odds with the freedom of the Church itself, as was the case in Germany and Italy in the 19th century: Nationalist movements led to the unification of both countries, but were accompanied by virulent anti-clericalism that led to the Kulturkampf in Germany and the abolition of the Papal States in Italy. Nationalism in the 19th century functioned at times as a kind of substitute religion and so put itself at odds with the Gospel.

But this sort of nationalism is not the same thing as the just consciousness and even pride in national identity. Pope St. Paul VI condemned the nationalism that led to isolation and opposed human development, but acknowledged the value of pride in national history and culture (Populorum Progressio, 62).

Pope St. John Paul II held that nations possess a kind of “subjectivity,” that is a sort of distinctive identity and inner life, that deserved respect and that underwrote a claim to autonomy (not necessarily statehood) in political, economic and cultural life (Solicitudo Rei Socialis, 15).

John Paul’s is a particularly important voice here: In one of his last writings, his 2006 book, Memory and Identity, he reflected on patriotism and national identity in a way that highlighted his own Polish nationality. John Paul’s understanding of the nation is complex. It is in one respect a thoroughly natural reality grounded in the fact that the nation is the land of one’s birth: The Polish word for nation, naród, comes from the word ród, which means “generation,” and thus mirrors the Latinate “nation,” which comes from natus, “born.” He relates this to the notion of patria; here again the notion of fatherhood that is the root of the Latin word is mirrored in the Polish.

The notions of land, birth, parentage and inheritance are all closely woven together. Just as one is born to a particular father and mother, who in turn communicate to one what they have through education and upbringing, so one is born to a particular land, which communicates what it has in virtue of its particular resources and history — both through one’s parents, but also through one’s relationships with one’s fellow citizens, who are also formed by a particular place.

Birth and upbringing are natural processes, but in the cases of both parents and country, they are invested with aspects of time and place. At the same time these things are signs of a transcendent patria, the homeland of all human beings in God’s kingdom beyond time and space. The relationship is analogous to that between one’s own parents and God. Indeed, John Paul suggests that patriotism is itself rooted in the Fourth Commandment’s injunction to honor one’s parents.

Thus the history, traditions, language and natural features of one’s country are objects of the virtue of piety. St. Thomas Aquinas treats piety within the context of his larger treatment of justice, holding it to reflect a debt one has first to God, but then to one’s parents and one’s country. Religio names the virtue according to which one gives to God his due; piety is the same with respect to parents and country.

God, family and country are here referred to by Aquinas as themselves “principles,” because they are the starting points of each of us; but like the starting points of our free choices, they are also ends. This is why John Paul also appeals to the ancient notion of the common good in this context: “The native land is the common good of all citizens and as such it imposes a serious duty.”

National identity, then, is as much a part of human persons as their family identities, although it is a cultural reality and not strictly natural. It reflects the embodied and time-bound nature of our human condition, but, properly understood, it points beyond itself to our home beyond family and country — our supernatural destiny as children of God and citizens of the Heavenly City.

National identity, therefore, need not be dangerous. Moreover, it promotes other aspects of the political common good. Perhaps, most importantly, it underwrites the willingness of members of the community to view their goods as shareable by all in ways that make possible social safety nets, responses to natural disasters and the necessary willingness to undertake risks and sacrifices on behalf of others. We learn this first relative to family and then extend it to friends, neighbors and fellow citizens. From here it is hopefully extended to all mankind, but first it must be learned in more local communities. This is the lesson of long experience.

Moreover, this lesson, along with moral principles like the common good and subsidiarity, are what justify the existence of markers like citizenship and borders. Citizens are those charged with the maintenance of the common good in particular communities, and borders establish the limits of such communities, thereby establishing who is responsible for and therefore accountable for the maintenance of the common good there. National identity is a component of both of these things.

Any nationalism that is consistent with Catholic teaching must satisfy at least two constraints.

First, it cannot define itself against the good or existence of other nations. If the nation and national identity are intelligibly related to human flourishing, they cannot be part of a zero-sum game in which nations must complete with one another on pain of subjugation or annihilation, nor can they be rooted in particular enmities, even if rooted in genuine historical injustices. Nationalisms that have this component must be purified by the Gospel as well as by sound practical reasoning. A national identity that is essentially negative is not sustainable.

Second, and related to this, no nationalism can be consistent with the faith if it claims to license acts that are prohibited by the natural moral law. Put otherwise, nationalism must not oppose itself to morality. Nothing that is not permitted to individuals is made permissible on the basis of national pride or identity.

Nationhood, like family, connects individual human persons to one another in a way that is mutually supportive and therefore constitutive of earthly common goods, but it also points beyond itself to the true patria beyond land and history. National identity is a healthy component of political life so long as it does not make of itself an obstacle to our ultimate destiny.

V. Bradley Lewis is an associate professor of philosophy and a fellow of the Institute for Human Ecology at The Catholic University of America.