“The story of the 21st century is less a story about exponential population growth than it is a story about differential growth — marked by a stark divide between the world’s richest and poorest countries,” Jennifer Sciubba, a professor of international studies at Rhodes College, writes in her new book, “8 Billion and Counting: How Sex, Death and Migration Shape Our World.”In some regions, Sciubba continues,Population pressures are blowing the top off of a pot already boiling with poor governance, civil war and environmental destruction. At best, there’s only dim hope for a peaceful future. When the pot boils over, countries across the globe feel the effects in the form of refugees and terrorist extremism.The resulting turmoil is empowering the ethnonationalist right — propelling Viktor Orban’s re-election to a fourth term on April 3 in Hungary and Marine Le Pen’s 41.5 percent showing in the April 24 French presidential election. In the United States, immigration has become a primary driver of the polarization between Republican and Democratic voters, crucial to Donald Trump’s election in 2016 and his continuing lead in the polls for the 2024 presidential nomination.As far back as 2006, David Coleman, a professor of demography at Oxford, described what he called a “third demographic transition” in “Immigration and Ethnic Change in Low-Fertility Countries”:A third demographic transition is underway in Europe and the United States. The ancestry of some national populations is being radically and permanently altered by high levels of immigration of persons from remote geographic origins or with distinctive ethnic and racial ancestry, in combination with persistent sub-replacement fertility and accelerated levels of emigration of the domestic population.Low fertility and high immigration, according to Coleman, “are significant because they are changing the composition of national populations and thereby the culture, physical appearance, social experiences and self-perceived identity of the inhabitants.”The British demographer Paul Morland, in an interview this year with the BBC, addressed the race issue head on in describing politically volatile population trends:The huge expansion in white populations we previously took for granted is now retreating, and historically majority-white countries are becoming much more diverse. Mass migration into Europe and America has changed the face of those continents, and identities will surely continue to shift in these nations over time. Toward the middle of the current century, the percentage of the U.S. population that belongs to minority groups is expected to be more than 50 percent, and that will surely have an impact. If you look at the ethnic makeup of Trump voters and his slim electoral victory, it’s clear he would not have been elected if America was less white.At the same time, Morland noted,Africa is about to have a huge population explosion — by 2100, there are very likely to be six or seven times as many Africans as Europeans. We’re in the middle of a massive shift in the global balance. The world is set to become much more African, and it will be very interesting to see how that will affect things.In his 2019 book, “The Human Tide,” Morland wrote: “If the biggest global news story of the last 40 years has been China’s economic growth, the biggest news story of the next 40 years will be Africa’s population growth.” It’s striking, Morland continues, “to realize that in the continent as a whole in 1950 there were far less than half as many people as there were in Europe. Today, Africa’s population is around a third larger than Europe’s and by 2100 it is likely to have quadrupled again, while Europe’s will have shrunk.”A graphic in Sciubba’s book illustrates the emergence of below-replacement fertility rates in Europe and North America — rates that have led to what my Times colleague Charles Blow has described as “white extinction anxiety.”Immigration, of course, does not engender only political responses. The psychological reaction to immigration — to the influx of new and unfamiliar populations — varies widely across the electorate.In a 2012 paper, “Tracing the threads: How five moral concerns (especially Purity) help explain culture war attitudes,” Spassena P. Koleva, Jesse Graham, Ravi Iyer, Peter H. Ditto and Jonathan Haidt argued thatindividuals who view illegal immigrants as weakening the U.S. economy (the socially conservative position) might also fear that immigrants will bring in dangerous and polluting foreign elements (Purity) and subvert American traditions and order (Authority).In an email to me, Ditto took this concept a step further:For some people immigration is conceived as akin to contamination, as allowing impure foreign elements into a sacred and pure “American” body politic — and those apprehensions about contamination drive their resistance to immigration — perhaps legal as much as illegal.But, Ditto cautioned, “this should not be taken to mean that these people view immigrants in a dehumanized way (as some kind of vermin) — that would be taking it too far. It is much more implicit than that — just a general valuation of purity and discomfort with contamination.”Along related lines, in 2014, Randy Thornhill, a professor of biology at the University of New Mexico, and Corey Fincher, of the Face Research Lab at the University of Glasgow, published “Democracy and Other Governmental Systems.” They develop a germ-related stress theory that in many respects complements Ditto’s emphasis on the crucial role of purity. “The psychological dimension of xenophobia, ethnocentrism, traditionalism, and authoritarianism,” Thornhill and Fincher contend, joins these features to pathogen-linked threat.Conversely, Thornhill and Fincher argue, “individualism (hence, liberalism), democracy, anti-authoritarianism, and women’s rights and freedom” are found more commonly in countries with relatively low health-related hazard.In an earlier paper, Fincher and Thornhill argued:In contemporary societies, collectivists and individualists differ significantly in their view of the social structure of the society in which they reside. Collectivists emphasize the boundary between in-group and out-group and are distrusting of and unwilling to contact out-group members; individualists make less distinction between in- and out-groups, and are more trusting of and show more willingness to contact out-groups.While it remains the subject of intense debate in academic circles, this line of argument has been gaining adherents.I asked Lene Aaroe, a professor of political science at Aarhus University in Denmark, about growing opposition to immigration, and she wrote back, first citing “two of the classical explanations” that underscore “concerns over cultural integration and competition over economic resources, respectively, as major drivers of attitudes on immigration.”She noted that in addition to these classical explanations there is “a growing line of research that emphasizes that psychological motivations for disease avoidance shape opposition to immigration. I have contributed actively to this line of work.”Aaroe described the premise of her research:That over human evolutionary history pathogens and infections have constituted a central threat to our species. In addition to the physiological immune system which fights infections once they have entered the body, our species has therefore evolved psychological motivations to help us avoid coming into contact with infections in the first place. These psychological mechanisms are typically referred to as the so-called behavioral immune system.These psychological mechanisms, according to Aaroe, “operate automatically at the unconscious level. They work through emotions of disgust and fear of disease and motivate people to respond with avoidance and distance-taking in the face of potential infection risk.” Aaroe noted that the fear of disease is often a misperception not based on reality but on a psychological trait prompting prejudicial judgments.In modern diverse and multicultural societies, Aaroe continued, “facial birthmarks, physical disabilities, or something as innocent as differences in skin color and ethnicity are subconsciously misinterpreted as cues of potential infection risk with skepticism and distance-taking as outcomes.”People vary in the sensitivity of their behavioral immune systems, Aaroe wrote, so “some are more prone to experience disgust in situations that involve potential infection risk (e.g. drinking from another person’s water bottle). Our cross-national research conducted in the United States and Denmark” — “The Behavioral Immune System Shapes Political Intuitions: Why and How Individual Differences in Disgust Sensitivity Underlie Opposition to Immigration” and “The Behavioral Immune System Shapes Partisan Preferences in Modern Democracies: Disgust Sensitivity Predicts Voting for Socially Conservative Parties” — “supports” the idea that “these individuals are also more likely to be skeptical toward immigration and to identify and vote for social conservative political parties that prioritize social conformity, order, and exclusionary policies toward out-groups and unfamiliar others.”Let’s take a look at some of the consequences of the line of reasoning developed by Ditto, Thornhill and Aaroe. Someone with an elevated fear of pathogens, who has more or less unconsciously translated that fear into opposition to immigration, may view liberals who want to open the nation’s doors as a threat to his or her health and, at the extreme, to his or her life.If this logic holds true, we have entered a new moral universe.Morteza Dehghani, a professor of psychology and computer science at the University of Southern California, emailed that he and his colleagues have found that “extreme behavioral expressions of prejudice against marginalized groups could be understood as morally motivated behaviors grounded in people’s moral values and perceptions of moral violations.”In a 2021 paper, “Investigating the role of group-based morality in extreme behavioral expressions of prejudice,” Joe Hoover, Mohammad Atari, Aida Mostafazadeh Davani, Brendan Kennedy, Gwenyth Portillo-Wightman, Leigh Yeh and Dehghani concluded:Across five studies, ranging from geospatial analysis of 3,108 U.S. counties to social psychological experiments with over 2,200 participants, we found evidence that group-level moral concerns (i.e., loyalty, authority, and purity) are predictive of extreme behavioral expressions of prejudice even after controlling for county-level confounders, such as political ideology.The moral legitimization of violence is the focus of Alan Fiske, a professor of anthropology at U.C.L.A., and Tage Shakti Rai, a psychologist at the University of California, San Diego, in their 2014 book, “Virtuous Violence: Hurting and Killing to Create, Sustain, End, and Honor Social Relationships.”They write that violence isconsidered to be the essence of evil: it is the prototype of immorality. But an examination of violent acts and practices across cultures and throughout history shows just the opposite. When people hurt or kill someone, they usually do so because they feel they ought to: they feel that it is morally right or even obligatory to be violent.Fiske and Rai argue that people “are morally motivated to do violence to create, conduct, protect, redress, terminate or mourn social relationships with the victim or with others. We call our theory virtuous violence theory.”Political conflict, scholars have found, can move into the zone of morally justified violence when elected officials and candidates focus their campaigns on grievance. As Ditto put it by email:When groups interact with each other, exchange things, this creates the potential for feelings of grievance to develop — they screwed us in some way. Once you feel that a group has wronged you or your group, then you are in moral territory.In a February 2021 paper, “Populism and the Social Psychology of Grievance,” Ditto and Cristian G. Rodriguez, a professor of psychology at the Universidad de los Andes, in Chile, write: “Populist political movements seek to gain power by leveraging feelings of grievance, a sense that ‘the people’ have been treated unfairly by ‘the elite.’” Evoking past grievance, they write, “has two clear collateral costs: it can be used to justify undemocratic means to gain political power, and its evocation risks initiating a self-escalating cycle of inter-factional political conflict.”As conflicts escalate, so do the perils of grievance politics:Feelings of grievance can lead people to feel licensed to abandon previous moral and procedural constraints. Although sometimes these constraints feel arguably bendable, abandoning other moral rules, such as adherence to democratic political tactics or prohibitions against violence, can be substantially more problematic. Research on highly contentious and moralized political environments has found them to foster an increased willingness to condone undemocratic means to achieve desired political ends, up to and including violence. In the U.S., partisan anger is associated with tolerance of cheating, lying and voter suppression as acceptable political tactics.I asked Ryan Enos, a political scientist at Harvard, how partisanship can become moralized, legitimating opposition and even violence. He replied:Politics plays a tremendous role in this. It is politicians who give action to latent attitudes and can organize collective action or even harness the power of the state. For example, Trump supporters might have had a latent tendency to be opposed to immigration but when Trump comes along and tells them that we need to “build a wall,” this made them think that immigration must really be a problem and, so, this latent tendency is activated. Then, when the state gets involved in building this wall and aggressively enforcing immigration, it brings power and action to these tendencies.Hostility to immigration, Enos wrote,seems to be tightly related to a person’s larger worldview, so that a person that tends to be right-wing will also tend to have hostility to immigration and a person who is left-wing will tend to be more open. Scholars don’t agree on how to characterize the differences between these worldviews, but notice that much of the language used to describe the differences has implications for acceptance of immigrants — for example, people on the right are described as seeing the world as ‘threatening’ or having a ‘closed’ worldview.Peter Howley, a professor of behavioral economics at Leeds University, shared Enos’s view of the crucial role of closed- and open-mindedness. “Openness is strongly correlated with immigration attitudes,” he wrote in an email, “and our own research demonstrates how openness strongly moderates the relationship between inflows of migrants into one’s local area and the self-reported well-being of existing residents.”This openness, Howley continued,captures the degree to which people are attracted by novel stimuli and entails a preference for variety and new experiences. For people comparatively low on openness, demographic change and all it entails from exposure to new cuisine, music and amenities may be a daunting prospect, but for people with high scores on openness, demographic change offers the potential for exciting new experiences.The political scientists Christopher D. Johnston of Duke and Howard G. Lavine and Christopher M. Federico, both of the University of Minnesota, write in their book “Open Versus Closed”:As partisan conflict has been extended to cultural and lifestyle issues, engaged citizens have organized themselves into parties by personality, a process we refer to as “dispositional sorting.” In particular, those with “closed” personality traits have moved into the Republican column over the past few decades, and those with “open” traits have become Democrats. More generally, open citizens now take their economic policy cues from trusted elites on the cultural left, while closed citizens adopt the positions of those on the cultural right.The conflicts within this country reflect in miniature the global tensions of the 21st century. Sciubba puts the predicament in context in her introduction to a new collection of essays, “A Research Agenda for Political Demography.”At one extreme:In high- and middle-income countries, the most recent transition is to extremely low fertility and low mortality, leading to a shift in the composition of various age groups — far more elderly than youth and declining proportions of those in the middle ages. For the world’s most developed countries, national goals of economic growth of 2 percent or more are mismatched with shrinking populations — the idea of infinitely expanding economies is rubbing up against demographic reality. In some states with low fertility, immigration is eroding the advantages of longtime ethnic majorities and political tensions are high. Rising support for anti-immigrant far-right parties and populists, particularly in the U.S.A. and Europe, are demonstrations of the connection between demographics and politics.At the other extreme:In lower-income countries, fertility remains high, but declining mortality means that these populations are growing exponentially — a different transformation. Population density is increasing as the amount of available land stays constant and the number of people who inhabit it grows two- or threefold. Climate change is accelerating strains on the land itself, and economic forces like globalization are restructuring economies, often toward production for export, rather than for subsistence. Economic crises too often turn into civil conflict, which then pushes populations into new communities and across borders, and creates a new set of problems for both senders and receivers.By this reasoning, the prospect, globally, is for worsening conflict between rich and poor countries and between the rich and the poor within countries. In many respects, politics is about organizing fear. Democracies break down and republics dissolve when fear is used too often as a motivating tool, a partisan weapon. The issue now is whether the political system can begin to organize our fear of one another in a constructive fashion that resolves rather than exacerbates conflicts.The Times is committed to publishing a diversity of letters to the editor. We’d like to hear what you think about this or any of our articles. Here are some tips. And here’s our email: letters@nytimes.com.Follow The New York Times Opinion section on Facebook, Twitter (@NYTopinion) and Instagram. More