In the final days leading up to the midterm elections, President Donald Trump’s message to the American people is resoundingly clear: Fear foreigners, particularly those to the south of us.

The people to fear, according to Trump and like-minded conservatives, are the caravan of poor Central American migrants who are fleeing dangerous situations and walking toward the US in hopes of receiving asylum in Mexico or the US.

Why? We are told by Fox News they are carrying diseases like leprosy and even long-eradicated ones, like smallpox. We’re told they are terrorists and criminals, and a liberal plot funded by the liberal billionaire George Soros.

None of these things are true, and there is no emergency here that justifies Trump sending active troops to the border. But fear and dehumanization are the defining rhetoric of this administration. And Trump uses them because they’re effective at rousing conservatives to turn out to vote.

“The caravan is a perfect obsession for Trump” and Fox News, Vox’s Dara Lind writes. The caravan provides “images that appear to validate conservative base fears of ‘invasion’ by ‘lawless’ foreigners and the countries that ‘send’ them.”

Fear is a deeply encoded emotion that can easily be stoked by politicians, with hugely damaging consequences. Here are the top lessons I’ve learned from researchers of intergroup conflict about where our fear of the “other” comes from — and what we can do about it.

Lesson 1: fearing outsiders is one of our oldest, built-in psychological tendencies

There’s a reason every country with immigration has pockets of xenophobia. It’s our instinct to be distrustful of those whom we perceive as being “them” rather than “us.” In prehistoric times, this is what kept us safe. In the modern age, it’s what nudges us toward bigotry.

In lab experiments, it’s shockingly easy to pit people against one another. Many experiments start with randomly assigning people arbitrary teams.

”Once you trip this wire, this trigger, this cue, that you are a part of ‘us versus them,’ it’s almost like the whole brain become re-coordinated in how it views people,” Jay Van Bavel, an NYU psychologist, told me in 2013. He often just uses “red” teams and “blue” teams for his experiments. Once on a team, participants immediately start showing bias toward their teammates. They’ll like their own teammates better; they’ll spend more time looking at their faces; they’re more likely to remember them.

Lesson 2: when we begin to fear outsiders, we dehumanize them

You can think of human psychology as a series of evolutionarily coded computer programs. These programs tell us how to react to new situations. When we see a baby, we want to pinch its cheeks. When we see a threatening stranger, we want to either fight them or flee from them.

Fearing others changes the way we perceive them. In experiments, this plays out in very literal and disturbing ways: In some experiments, psychologists can get participants to rate “outsiders” as having fewer human qualities.

”It’s what we call an over-exclusion bias,” Mina Cikara, a Harvard psychologist who studies intergroup conflict, said in an interview last year.

When you start fearing others, she says, “your circle of who you counted as friends is going to shrink. And that means those people outside of the bounds get less empathy, get fewer resources.”

It also means you become more vigilant and obsessed with marking who is an insider and who is not. “You want to draw those boundaries brighter, so you don’t make any mistakes about who you want to share your resources with or who you want to trust,” she says.

This fear can then be compounded by in-group pride. “People who empathize more with their own groups tend to be more aggressive toward the out-group,” she says.

Lesson 3: when we dehumanize outsiders, we justify hostility against them

History and psychological science show us that when we refer to people as “animals” or anything other than “people,” it can flip a mental switch in our minds. It may increase our anger and disgust toward them. We perceive them less warmly.

If you think of murder and torture as universally taboo, then dehumanization of the “other” is a psychological loophole that can justify those acts.

“Individuals who dehumanized Mexican immigrants to a greater extent were more likely to cast them in threatening terms, withhold sympathy from them, and support measures designed to send and keep them out, such as surveillance, detention, expulsion, and building a wall between the United States and Mexico,” Northwestern University psychologist psychologists Nour Kteily and Emile Bruneau wrote in a 2017 paper.

A lot of Trump’s dehumanizing rhetoric is focused on gang members. “These aren’t people,” he said about members of the gang MS-13 in May. “These are animals.” On Wednesday, he claimed there were gang members in the caravan.

Our military is being mobilized at the Southern Border. Many more troops coming. We will NOT let these Caravans, which are also made up of some very bad thugs and gang members, into the U.S. Our Border is sacred, must come in legally. TURN AROUND! — Donald J. Trump (@realDonaldTrump) October 31, 2018

This language is also alarming considering that Trump often blurs the line when talking about undocumented immigrants involved in crime and immigrants in general. Dehumanization turns down our empathy for others. It may make us numb, for example, to the pain of separating immigrant children from their parents.

Lesson 4: when we fear outsiders, our brains exaggerate their threat

Van Bavel and his colleague Y. Jenny Xiao illustrated this concept nicely in a 2012 paper.

The test was simple: The researchers asked participants to estimate the straight-line distance from New York to Mexico City. Participants who expressed more animosity toward Mexican immigrants rated Mexico City as being several hundred miles closer to New York than people who felt less threatened. Since then, Van Bavel has found data that shows if people think the wall between the countries is secure, the effect goes away.

Lesson 5: anecdotes that instill fear of outsiders are much, much stickier than facts and figures

Our brains are built to be vigilant. We’re constantly on the lookout for threats. That’s why stories about immigrants committing crimes, stories about neighbors losing jobs to immigrants, and assertions that immigrants aren’t loyal to their adopted countries are all extremely powerful (regardless of whether they’re true).

”Once you can get that one story out there, it’s enough to start the cycle of people thinking this way and changing how people think about these out-groups,” Cikara says. “People are very sensitive to anecdotes, more than they are to abstract representations of data.”

Our minds have evolved to think in mental shortcuts — heuristics — but in the modern age, they can lead us astray.

Lesson 6: few are immune to fearing the threat of outsiders

Multiple studies find when most white people are reminded that minorities will eventually be the majority, they begin to feel less warm toward members of other races.

Demographic change, researchers explain, is a source of threat that activates zero-sum thinking about race. If minorities are on the rise, the logic goes, then the majority must be losing out. “People who think of themselves as not prejudiced (and liberal) demonstrate these threat effects,” Jennifer Richeson, a leading researcher on racial bias, said.

A more recent experiment showed that this reminder increased support for Trump. This doesn’t mean all white people harbor extreme racial animus; it means fear is an all-too-easy button to for politicians to press. We fear unthinkingly. It directs our actions. And it nudges us to believe the person who says he will vanquish our fears.

Lesson 7: it is possible to teach people to turn fear into something more positive

The negative reaction to refugees is more emotional than rational, and psychologists say it’s unlikely to be countered by statistics or logical counterarguments. To change people’s minds, either the negative emotions (“refugees are dangerous”) need to be turned down or more positive emotions (“refugees are human beings like us and need help”) need to be turned up.

Cikara singles out an intriguing experiment published in the journal Psychological Science that demonstrates it’s possible to teach people to downplay negative emotions in us-versus-them decision-making.

For that study, Israeli researchers taught half their participants a technique called cognitive reappraisal — basically a method to challenge your negative emotions, question how they originate, and then watch them dissipate among that introspection. All the participants were then instructed to look through materials designed to get them angry. A week after the training, all the participants were asked questions about the Israeli-Palestinian conflict. “What [the authors] found was that those who had practiced emotion regulation ... actually preferred less hostile and more diplomatic approaches,” Cikara says.

Getting American politicians into cognitive reapprasial classes seems unlikely, but there is another approach. Charities have long understood the ”identifiable victim effect,” which suggests that images of singular victims are easier to empathize with than statistics, even when those statistics are astronomical.

It’s fighting emotional anecdotes with emotional anecdotes.

”This is why pictures and stories can be so powerful,” Deborah Small, a professor of marketing and psychology at the University of Pennsylvania, told me in 2015. “Identifying and telling the stories of more innocent refugees could make the victim’s case more moving.”

Final lesson: the boundaries of who we see as “us” and “them” are flexible

Our brains love seeing the world in terms of “us versus them,” but there’s nothing in our brains that defines who “they” are. Experiments often put people into arbitrary teams. So do societies.

In 2013, Van Bavel told me about a trick that sounded really simple and hopeful. Sometimes he’ll switch a red team participant to the blue team and vice versa. “We say, ‘Listen, there’s been a mistake, you’re actually on the other team,’” he told me then. “And the moment we do, we completely reverse their empathy. Suddenly they care about everybody who is in their new in-group.”

That might be simple in the lab, but in the real world, these feelings are more deeply entrenched. But even in the real world, experimenters are showing there are ways to reduce bias.

In 2016, I reported on an experiment that showed with just the right dose of empathy, canvassers could change voters’ mind on transgender rights issues. “Two decades of opinion change took place during a 10-minute conversation, and it persisted for at least three months — that’s a big effect,” Josh Kalla, one of the co-authors, told me. All it took was a conversation where the voter was asked to put themselves in a transgender person’s shoes.

That type of outreach is difficult, but not impossible.