Children pledge allegiance to the U.S. flag at Raphael Weill Public School, San Francisco, in the early 1940s. (U.S. National Archives and Records Administration)

David Goodhart is the founder and former editor of Prospect magazine and the head of demography, immigration and integration at Policy Exchange.

LONDON — The word “tribe” used to belong to humanity’s distant past, conjuring images of primitive men carrying spears or perhaps of the unchanged communities in the Amazon rainforest.

But now the language of tribes and tribalism is everywhere you look. And it’s a good thing, too. The return of the discussion of tribes is a metaphorical recognition of the shallowness of much of modern liberalism, with its awkwardness about the human need for recognition, belonging and group attachment, along with its implicit claim that society is just a random collection of individuals.

It is also a recognition of the weakening of the bigger, collective identities of nation, class and religion in recent decades and the rising importance of sub-groups, often value tribes of various kinds.

Value tribes are an unavoidable but often fragmenting reality of the modern world. A gulf has opened between the two big, loose value tribes that dominate western liberal societies. In my book “The Road to Somewhere,” I call these the people who see the world from “anywhere” and those who see it from “somewhere.”

“Anywhere” people, about 25 percent of the population, tend to be educated and mobile; they value openness, autonomy and individual self-realization. They tend to have careers rather than jobs and “achieved identities” based on academic and professional success.

“Somewheres,” about half of the population, are by contrast more rooted and less well-educated; they tend to value security, familiarity and group attachments (national or local) that Anywheres often don’t feel or respect. Somewheres generally have “ascribed identities” — their sense of themselves is more likely to come from the place they come from and the local ways of life they are attached to, which means that they are more likely to be discomforted by rapid social change.

This is just the primary value divide from which there are many offshoots and subdivisions. In real life, the story is less binary than it sounds, and there is a big group of about 25 percent of the population who share almost equally the two loose worldviews.

It is also important to remember that both of these worldviews are, at least in mainstream form, perfectly decent and legitimate. And if the task of modern politics in light of the great populist upsets of Brexit and Trump is to find a new settlement between the interests of Anywheres and Somewheres, then there is one key principle that must be accepted by both groups.

The principle is this: most forms of group attachment are compatible with the main liberal values of individual rights and human moral equality. To put it another way: the human desire to belong does not require hostility to outsiders.

It is true that some of the history of the 19th and 20th centuries did involve forms of nationalism based on exclusion and hostility toward outsiders, but a combination of greater wealth and security and several generations of liberal common sense has substantially reduced the danger of such militant nationalism.

Somewheres, I believe, understand this better than Anywheres. There are more extreme Somewheres who are genuinely authoritarian and xenophobic who reject most liberal values, but most of them have broadly gone along with the “great liberalization” of the past few decades on issues of race, gender and sexuality. They express a politics of decent populism.

Anywheres, by contrast, find it simple enough to accept the rights of strangers and the claims of equality, but they find it harder to understand group attachment. Especially in the United Kingdom, where I live, elite formation from the imperial era onwards has been partly about reducing attachment to place and group of origin to help fashion an effective, cohesive ruling class.

Mass higher education in the U.K. has adopted the residential forms of elite boarding schools and elite higher education. So, the vast majority of British students leave home at 18 to go to college and become absorbed into completely different social circles from their school and hometown. If they then pursue professional careers, they may never return home, working in London or maybe abroad for a few years and then settling down in places full of like-minded graduates.

This deracination of the educated class helps to explain the sharpness of the cultural divide over the Brexit vote — most of those who voted to remain in the European Union had no friends who voted for Brexit and vice-versa. Few graduates of elite universities have any close friends who are non-graduates. Because of this, the task of political reconciliation in our liberal societies is especially hard in the U.K. But the goal is simple enough: liberal pluralism tempered by the common good.

Neither militant liberals, who fear the masses are always teetering on the edge of new forms of authoritarianism, nor militant populists, who are hostile to diversity, find it easy to accept that many people live according to different norms. And, of course, it is possible to have too much fragmentation, which is why moderate nationalism remains such an important glue for liberal societies, reinforcing shared norms and social solidarity. Notwithstanding the increase in global interdependence, all the most important features of political society remain overwhelmingly national: the law, the welfare state, democracy — things that make us feel connected in a joint endeavor.

The Anywhere centrifugal forces in modern societies are strong: The Cold War is over, removing a common enemy; liberal individualism is the dominant ethos; high immigration and diversity have reduced trust and cohesion; identity politics has fragmented political action. The more rooted Somewheres provide a centripetal balance to these trends, and the reassertion of that voice is a welcome development, helping to combine modern liberalism with that age-old need for belonging. Moderate nationalism is the localism of a more globalized world and is the means to exercise some democratic control over that process.

This was produced by The WorldPost, a partnership of the Berggruen Institute and The Washington Post.