Last week witnessed outrage over racism at the highest levels of government in Britain and the United States. The day after the U.S. Congress voted to condemn President Donald Trump’s attacks on four congresswomen of color, British Prime Minister Theresa May and opposition leader Jeremy Corbyn accused each other of tolerating racism in their parties.

Such moral indignation might make racism seem a taboo and Trump a pariah. But this would ignore both the insidious nature of racism and its tenacity, not to mention the hypocrisy of those ostentatiously recoiling from it.

For instance, as Britain’s Home Secretary, May literally told refugees and illegal immigrants to “go home” — the message emblazoned on vans sent to ethnic neighborhoods — and presided over the deportation of elderly British citizens to where they had come from as young children: the Caribbean. With his policy of mass incarceration, Bill Clinton arguably did more than any Republican president to evict African Americans from public life.

British and American leaders may not have ever said, and might not even agree, that “the whole problem is really the blacks,” as former U.S. President Richard Nixon privately blurted out in the 1970s. Nevertheless, they have for decades composed an ascending scale of dog whistles, appealing to a white, supposedly “silent majority” with assorted wars on crime, drugs and “welfare queens.”

The “post-racial age,” hastily declared during the worst economic crisis in history, turned out to be an illusion. Trump has expanded on Nixon’s “problem,” identifying Muslims and Hispanics as well as African Americans as treacherous elements within a potentially great white nation.

Yes, it is tempting to denounce him and his followers as singularly racist. But Trump’s demagoguery distracts from an awkward truth: Racial exclusion is not just a nasty form of bigotry periodically amplified by opportunistic politicians. It is instead a time-tested way of creating a coherent and cohesive political community. Indeed, it’s what originally underpinned the making of political communities in Britain and America.

From the beginning, the natural rights of propertied men were defined against omnipresent threats and dangers — from mutinous natives to rebellious slaves. The rights of free-born Englishmen and Americans were not deemed appropriate for the backward and potentially volatile peoples they subjugated, as even the impeccably liberal thinker John Stuart Mill concluded when he claimed that “despotism is a legitimate mode of government in dealing with barbarians.”

While an influx of immigrant labor from China, Japan, Ireland, Russia and Germany in the 19th century transformed the U.S., such demographic shifts did not radically alter old ways of ordering social, economic and political life. Not surprisingly, Adolf Hitler admired U.S. immigration laws for excluding “foreign bodies” and saw British imperialists as an ideal master race.

Relatively equitable economic growth after 1945, and the West’s obligation to look morally superior to Soviet communism in the Cold War, did enable campaigns against overt racism, such as the civil rights movement, to score some important victories. But the social and political consensus behind such progressive movements was always fragile, as the white backlash, already advanced under Nixon, clarified.

Indeed, modest attempts at reparative justice for the historical victims of slavery and colonialism, such as affirmative action, incited a now widespread suspicion: that supercilious metropolitan elites, including liberals, multiculturalists and human-rights activists, were pampering scroungers and idlers, if not criminals and terrorists, at the expense of the hard-working “white working class.”

Fingering Trump as the racist-in-chief is easy and one could go further and denounce much of the world’s population as racists. After all, many new democracies also manifest systemic and ideologically legitimated discrimination, part of a globally practiced majoritarian politics of fear.

The plight of the Rohingyas in Myanmar, for instance, is hardly due to an abrupt increase in racists and ethnic-religious supremacists in the country. Nor are such hatreds merely a pathology unleashed by economic adversity. A proposed new law in India, one of the world’s fastest-growing economies, would grant residency and citizenship rights only to non-Muslim immigrants.

The fact is that the exclusion of racial and ethnic barbarians has been central to the practice of democracy for much of modern history: a way of building civic community and social solidarity, of mitigating human fears and fostering hopes for the future. The outrage against them may have made racists seem beyond the pale last week. But it would be dangerous to forget that they have long had history on their side.

Pankaj Mishra is a Bloomberg Opinion columnist. His books include “Age of Anger: A History of the Present,” “From the Ruins of Empire: The Intellectuals Who Remade Asia,” and “Temptations of the West: How to Be Modern in India, Pakistan, Tibet and Beyond.”