People around the world are stunned at the rise of Donald Trump - from complete outsider to Republican nominee for the US presidential election.
At the start of campaigning for the nomination, almost nobody gave Mr Trump a chance. One article even suggested he had a better chance of playing in the NBA finals than of winning the party's nomination. Now, he will become president of the United States.
Commentators and analysts have offered many reasons for how the outspoken billionaire has come so far, but what insights can scientific research provide? And what can it suggest for how the US can move beyond the polarisation caused by this highly divisive election campaign.
IN-GROUP VERSUS OUT-GROUP
According to a recent study by two political scientists, who compared the language of the major political candidates for the election, Mr Trump presents a "unique combination of anti-expertise, anti-elitism and pro-nationalist sentiments". And his supporters show "high levels of conspiratorial thinking, nativism, and economic insecurity".
Mr Trump fits nicely into the mould of populist politics - his language appeals to the idea that the elite group holding power mistreats ordinary citizens. And that by working together, he and his supporters can overthrow the elites and return power to the people.
Mr Trump uses the old political trick of creating a view of the world as divided into "us" and "them". And he focuses on two key messages that reinforce this division: stopping immigration from certain groups and "making America great again".
Mr Trump uses the old political trick of creating a view of the world as divided into 'us' and 'them'. And he focuses on two key messages that reinforce this division: stopping immigration from certain groups and 'making America great again'... Focusing on out-group threats may be an old trick but it's effective because our brains are highly sensitive to out-group attacks on in-group members.
His identification of immigrants as an "out-group" creates a shared identity for his followers as the "in-group". Politics becomes a competition between us, the "good" people, against the "bad" criminals and terrorists. This technique has been used by people in power since time immemorial, and who the bad people are changes according to the situation.
Focusing on out-group threats may be an old trick but it's effective because our brains are highly sensitive to out-group attacks on in-group members. From an evolutionary perspective, out-group attacks often posed an existential threat to the in-group, which required rallying behind the in-group leader for protection.
Behind the idea of making America great again, Mr Trump's key message is that the national elite made bad trade deals that shipped manufacturing jobs overseas. It's true that the percentage of US workers in manufacturing has fallen from 24 per cent in 1960 to 8 per cent this year. And regardless of whether this loss was caused by bad trade deals, people who lost their manufacturing jobs believe his message.
This explains why Mr Trump is so popular with white, male, working-class Americans who were typically employed in these industries. Again, by invoking an "us" (the hard-working common people) versus "them" (the ruling corrupt elite), Mr Trump rallies a large group of people behind him.
Not surprisingly, in the time since Mr Trump declared he was standing for the presidency, the American electorate has split into two groups that strongly oppose each other: Minorities, women and left-wing college-educated liberals mainly support Hillary Clinton, while white, working-class males, evangelicals and right-wing conservatives mainly support Mr Trump.
Both groups claim the moral high ground, maintaining that it is they who uphold universal standards and adhere to them.
According to the moral foundations theory, which tries to understand why morality varies between different people and cultures, both groups might be right because they're driven by different moral motivations.
Psychological research shows both left- and right-wing voters are motivated by kindness and fairness, but the latter are significantly more motivated by authority, traditions, sanctity and loyalty to in-group members. This difference in moral perspective between Democrats and Republicans might be one of the reasons why political polarisation in the US is so significant.
But whoever wins the election will have to govern for the whole of the country, so how can these views be brought closer together?
APPEAL TO VOTERS' FEELINGS
People might think that using logical intellectual arguments is the most efficient way to win people over. But, according to psychology professor Drew Weston, this strategy might be largely ineffective. In his 2008 book The Political Brain, he argues that the reason Al Gore and John Kerry lost to the "less intellectual" George W. Bush in the 2000 and 2004 presidential elections was because Mr Bush was much better at appealing to voters' emotions.
He says voters are not cool calculators who make rational decisions based primarily on policies. Rather, elections are often decided by how people feel - first, by how they feel towards the parties and their principles, and then by how they feel about the candidate.
And once people have made up their minds about a party or a person, it's very hard to change their view. In fact, people actively seek information that confirms their beliefs and will often ignore contradictory information, in a process known as confirmation bias.
My colleagues and I found further scientific evidence for confirmation bias in a recent neuroimaging study. We found that brain areas involved in processing information were more active when people observed positive messages from in-group political leaders, and negative messages from out-group political leaders.
This suggests people like to hear messages that confirm what they already believe, such as our group is "good" and the other group is "bad".
In this sense, Mr Trump might have had a point when he said he could shoot someone on Fifth Avenue and his supporters would still vote for him.
WHAT CAN BE DONE
How, then, can the incoming president heal the fractured country and move people from the extreme left or right of the political spectrum to the centre?
If Mrs Clinton had won, she would have to take seriously people's concerns about illegal immigration and job losses in manufacturing.
Research by political scientist Kai Arzheimer suggests that stemming the rise of extreme right-wing views might require lowering immigration and unemployment. While everyone will agree that lowering unemployment rates is a good thing, reducing immigration might be unpalatable for some on the left.
Recent figures suggest there are around 11 million undocumented immigrants and 42.4 million immigrants in total in the US. But it's not necessarily the total number of immigrants that matters; rather, it's the notion that some immigrants pose a perceived economic or cultural threat - or both - to its citizens.
People on the right of the political spectrum are highly sensitive to the arrival of people from different cultures to their country because they see them as undermining their key moral foundations of authority, purity and loyalty to in-group culture. This might explain why German Chancellor Angela Merkel's open-door policy on asylum seekers may have given a boost to extreme right-wing views in her country.
Psychology research shows that when people feel under threat, their political opinions move to the right. Having a solid immigration policy, then, is essential for curbing right-wing extremism. In the same sense, extreme left-wing views such as open borders and unlimited immigration may have the opposite effect of what their supporters hope to achieve.
All this suggests that tackling unauthorised immigration to the US should also be a priority for Democrats. Once this is the case, support for legal immigration is likely to grow and a path to legalising current undocumented immigrants could open up.
This will not only benefit citizens, who will feel their territory is secure, it will also benefit undocumented immigrants, who won't have to live in fear of deportation. And the sense of security that a solid immigration policy imparts will reduce extreme right-wing tendencies in the whole of the population.
Similarly, now that Mr Trump has won, he will have to overcome a large group of sceptics.
His divisive and offensive language has alienated many and made him the most unfavourable candidate in the history of the American presidential election.
To win over the general public, he will have to change his populist rhetoric and embrace a vision for America that everyone can identify with.
This means listening to groups on the left of the political spectrum, and addressing the concerns of minorities by softening his rhetoric on immigrants and looking at the issues raised by groups such as Black Lives Matter.
Economic research shows that social cohesion is vital for good institutions and growth. If Mr Trump wants to succeed in "making America great again", he has to make sure everyone is on board.
The writer is a senior lecturer in social neuroscience, Monash University, Australia.
This is excerpted from a longer article that first appeared in theconversation.com, a website of analysis from academics and researchers.
We have been experiencing some problems with subscriber log-ins and apologise for the inconvenience caused. Until we resolve the issues, subscribers need not log in to access ST Digital articles. But a log-in is still required for our PDFs.