They have to pay: EC president Jean-Claude Juncker warns UK over Brexit negotiationsReuters

A fear of foreigners and "collective narcissism" were two of the main factors that drove a majority in Britain to vote to leave the EU, according to a study.

Researchers at London Goldsmiths University found that xenophobia was strongly linked to the Leave vote regardless of age, gender or education. Elsewhere, the study found that the idea that the UK was not "sufficiently recognised by others" also led to people backing Brexit during the referendum in June 2016.

The study defined collective narcissism as a mass belief that a group - in this case the British population - deserved special treatment and demanded acknowledgement and respect from others.

Collective narcissism has been linked to the rejection of foreigners and to the "direct and indirect retaliatory hostility in response to real or imagined offences to the in-group".

Agnieszka Golec de Zavala, a senior lecturer in psychology at Goldsmiths and lead author of the study, said that collective narcissism "differs from feeling proud to be British or thinking of oneself as British".

She explained: "We know only that collective narcissism predicts xenophobia. We wanted to see whether there was a link between collective narcissism and voting motivated by xenophobia."

To do this, the researchers conducted two questionnaires – one shortly after the EU referendum and another in September 2106.

In the first study, 280 participants who voted were asked a series of questions including the extent to which they agreed with the claim that immigrants threatened the UK way of life, British citizens' jobs and personal rights, freedoms and physical health.

The study found that agreement with these statements was strongly related to the tendency to vote for Brexit and happiness with the referendum's outcome.

The study also explored three personality traits that were independently related to both xenophobia and support for Brexit. The first was right-wing authoritarianism ("obedience and respect for authority are the most important virtues children should learn"), social dominance orientation ("we should not push for group equality"), and collective narcissism ("I will never be satisfied until my national group gets all it deserves").

A second study, conducted just after the government announced support for the hard Brexit option, also found that people who valued their British identity or believed it was great to be British were not more likely to reject immigrants or support Brexit, so making a distinction between patriotism and xenophobia.

According to the research, the idea of collective narcissism has "rarely been considered" in the context of voting behaviour.

Speaking to Research Gate, Zavala added: "National collective narcissism stood behind the Brexit vote but also behind the Trump vote in the US.

Research claims 'collective narcissism' was a key factor for BrexitGetty

"It is linked to support for the nationalist, ultraconservative, Eurosceptic government in Poland and in Hungary. It is linked to support for dictatorial rule of Vladimir Putin in Russia. The concept of collective narcissism was first introduced to describe the sentiments stirred by the Nazis in Germany.

"Our studies show that collective narcissism systematically predicts prejudice, aggression and a tendency to interpret even ambiguous or innocent behaviours of others as provocation to the national group.

"If we care about diverse societies and harmonious intergroup relations, a collective narcissistic definition of our national identity is not what we should strive for or spread."