Martin Luther King Jr. Day is a time for reflecting on the problems of racism, xenophobia, and the social distinctions that divide us. But the politics of 2016—from nativism in the United States to anti-immigrant sentiment in Europe, which facilitated the rise of President-elect Donald Trump and Brexit, respectively—suggest that in 2017, we might do well to adopt a different lens for viewing such issues.

One way to understand last year’s events is through a theory in social psychology known as “othering.” It explains how identity formation, as well as group cohesion, is facilitated in part by distinguishing oneself from those viewed as different. The distinction can be based on traits that are inherent, such as skin or eye color, or socially constructed, such as the distinction between Hutus and Tutsis. Identifying the “other” is part of what binds a group together, by creating mental rules for identifying who is in—and who is out. Othering can be pretty harmless, even beneficial, when it builds community among, say, sports fans rooting against the New York Yankees or the Dallas Cowboys (which is why sports leagues hype artificial rivalries between teams).

When it comes to national identity, though, othering carries substantial risks. Policymakers seem to have vastly underestimated the need for othering—and its consequences. Sure, scholars always knew it existed and there has been some good research on it. But many did not recognize the extent to which othering was a central threat to liberalism and globalization, and even started to think that cosmopolitan integration was inevitable.

Here’s the key: if a nation’s “other” is suddenly removed, it can and often does fall into internal disharmony and dysfunction—and it often takes years or even decades to fully manifest. Consider the evidence. Since the end of World War II, there have been two big cases of an international “other” suddenly disappearing. One was decolonization. When the United Kingdom or France or another colonial overlord retreated, most ex-colonies, no longer united by a common enemy, found new ones among each other. They faced serious crises of national unity, often splitting along ethnic or religious lines.

When Britain left India, previously workable relations between Hindus and Muslims quickly soured, splitting the country in two—with the creation of Pakistan in 1948—and then in three—with the birth of Bangladesh in 1971. In Africa, most newly independent states had a weak national identity, because they were composed of multiple tribes or groups forced together under colonialism. As a result, anti-colonial movements devolved into internecine violence between ethnic groups, sometimes rapidly (Angola, Nigeria) and sometimes decades after decolonization (take Burundi, Rwanda, South Sudan, and Sudan, for example).

The second instance of a foreign “other” suddenly disappearing was with the fall of the Soviet Union. In the United States, this created political difficulties, disproportionately for the Republican Party—long the party of anti-Communism—in both the short and long run: without the Soviet Union, there was no point in deriding Democrats as soft on Communism and national security. (The question of which party was actually tougher on Communism was irrelevant. It was all about voter perception, just as the question today of which party is more fiscally responsible is only loosely connected to the facts, at best.)

But the full consequence of the loss of this “other” is only now appearing. The political scholars Thomas Mann and Norman Ornstein have convincingly described how the Republicans moved from being a small-government party to an anti-government party in the 1990s and 2000s, where they basically found that everything the government did was bad. What Mann and Ornstein did not incorporate in their analysis, however, was how that shift was partly due to the need for othering in party politics. It seems that only now are the full consequences of the collapse of the Soviet Union, and what that meant for the Republican Party, coming into view.

With the Soviets no longer a threat, “Washington elites” replaced “Communists” as the Republicans’ favorite bête-noire. That message of othering reached fever pitch in 2016, aided, no doubt, by the twin policy failures of the Iraq war and the financial crisis of 2008. Its roots, however, lie in 1991.

For national politics, three features of othering are salient. First, the “other” must be sufficiently central to the nation’s foreign relations that its identity and sense of correct behavior can be formed in reaction to it. For example, when it came to the Soviet Union, othering meant that Americans deepened their commitment to capitalism and democracy, resisted direct government participation in the economy (such as in health care, at a time when other industrialized nations set up public health care systems), and structured U.S. foreign policy in ways to attract and retain other countries to “our side” of geopolitics. Second, the “other” can take two forms: “enemy” or “inferior.” The latter leads to bigotry, of course, but tends to pose less of a risk of international war. And third, a group of leaders must construct and reinforce a narrative about how the United State’s challenges and opportunities are related to the “other.”

These three features help explain why, after the fall of the Soviet Union, the United States could not easily identify a new “other.” Americans see Mexico as inferior, but it is not sufficiently central to define American identity (though there is plenty of bigotry). Since the 1990s, there have been only two real candidates. The first is Islam, thanks to the 9/11 attacks. But American leaders refused that option, justifiably worried that it was overly broad and would lead to immoral discrimination. Ten days after those attacks, President George W. Bush said, “The enemy of America is not our many Muslim friends.” The second is China. But again, U.S. leaders refused to frame it as the “other.” Labeling Beijing an “enemy” could have hampered business and trade and depicting it as “inferior” just didn’t work given its economic dynamism. Without an external “other,” both parties turned to domestic ones. Republicans increasingly turned their ire on educated experts, scientists, and elites. Democrats turned identity politics into a Manichaean moral battle, prioritizing it over almost everything else—and labeling anyone who opposed them as bigots.

Trump worked the othering tendencies of both parties to his advantage. His victory is often explained as a product of racism and anti-immigrant nativism, but it is not as though the American electorate suddenly became more racist than ever before. Indeed, Americans are, on average, more racially tolerant than ever. What changed is that Trump took a longstanding Republican narrative about smug elites one step further. Vulgar “political incorrectness” was a badge of honor to be worn in protest of Washington elites—embodied by his rival Hillary Clinton. Even if many Trump voters did not like his racist or sexist views, they loved his willingness to tweak the noses of polite society. Othering was part of what allowed a billionaire to portray himself as a man of the people.

In Europe, the politics of othering since the fall of Communism have been less straightforward, partly because of the European Union, which gave governing parties an ideology in favor of international integration, and partly because anti-Communism was less central to European leaders’ political narrative than it was for Americans. The absence of an external “other” did not transform European right-wing parties as it did the U.S. Republican Party. The British Conservative Party, for example, mostly repressed its nativist wing because its key constituents, finance and big business, wanted access to the EU. Instead, the need for othering created political space for new parties on the far right, such as the U.K. Independence Party and Marine Le Pen’s National Front in France. Those parties were perfectly willing to capture a segment of the electorate, disproportionately drawn from the white working class, who wanted their bruised national identity salved by vilification of an “other”—in this case, immigrants and the elites of Brussels.

Canada, the exception in the trend toward rising illiberalism in the West, is also well explained by “othering.” Canada celebrates multiculturalism, welcomes Syrian refugees, and has a well-functioning democratic system. Why? No single factor explains this outcome, but one reason is that Canadians have a persistent “other,” namely the United States. Canadians see Americans not as an enemy but as inferior. Popular Canadian magazines have no trouble asserting that “Canadians are just better people.” Canadians are not the only ones to look down on Americans, of course, but nowhere else is it so central. Moreover, Canadians distinguish themselves from Americans on enlightened criteria: greater racial tolerance, universal health care, better acceptance of immigration. That seems to be just enough othering to cultivate national unity, without wrecking its relationship with its greatest economic partner.

Singapore is an example of how, even in an illiberal society, a regime can manage the ethnic “othering” that might otherwise produce tensions and dysfunction. Its population is 74 percent ethnically Chinese, 13 percent Malay, and nine percent Indian. Singapore decided in November 2016 to make the presidency, a mostly ceremonial post, rotate between the three major ethnic groups. Prime Minister Lee Hsien Loong said that he wanted every citizen to “know that someone of his community can become president and in fact, from time to time, does become president.” That means that the regime periodically decrees that only members from a particular ethnicity can run for president in a given cycle. The system is clearly illiberal and problematic. But Singapore’s race relations and civic society are remarkably good, especially compared to neighboring Malaysia. The point is that successful regimes do not ignore othering. They harness and channel it.

But when elites fail to give reasonable cues about who the “other” is, people decide for themselves. Sometimes they turn on the elites, as the rise of the Tea Party movement suggests. Sometimes the people turn to racism and xenophobia, as the rise of white nationalism suggests. Regardless, it is never good.

Perhaps the key point for classical liberalism is that abstract, cosmopolitan principles of tolerance and equality do not seem to be enough to be the basis for a national culture. It might work for some, especially intellectuals, but it is not enough for the vast majority of people. Othering is too deeply rooted in our primal psyche. So as we think about how to prevent the creeping illiberalism, we might give serious thought to how to address the need for othering instead of pretending it does not exist.