When I give talks on Europe’s “refugee crisis” I often start by showing a photograph of a rescue boat arriving at the port of Augusta in Sicily, in 2015. It shows a teenage girl of African or Middle Eastern origin looking quizzically at a European official covered from head to toe in white protective gear, with face mask and goggles. Who, I like to ask the audience, is the threat to whom?

Now that the coronavirus has come to Europe, and rightwing nationalists are rushing to find scapegoats, this question has a renewed urgency. In Italy the far-right opposition leader, Matteo Salvini, has led an attack on the government for allowing a boat carrying 276 people from Africa who were rescued in the Mediterranean to dock in Sicily. Although Europe far outstrips Africa in terms of confirmed coronavirus cases so far, Salvini portrayed this act of humanitarianism as grounds for Italy’s prime minister, Giuseppe Conte, to resign, accusing him of being unable to “defend Italy and Italians”. Rescued migrants have been disembarking in Italy for many years; this has not led to any major outbreaks of disease among Italians, although many migrants have died at sea because of a lack of will to save them.

Greece’s nationalist New Democracy government, meanwhile, has cited the risk of coronavirus infection as a reason for pressing ahead with its controversial plan to build “closed” camps – detention centres, in other words – for asylum seekers trapped by European policies on the Aegean islands of Lesbos and Chios. The situation – a monument to the shortcomings of “the most expensive humanitarian response in history” – has long been a threat to health: the physical and psychological health of the people trapped in overcrowded and unsuitable living conditions. A Washington Post report this week aired claims that meals for inhabitants do not meet minimum calorie requirements.

The Moria camp in Lesbos: ‘Greece’s nationalist New Democracy government has cited the risk of coronavirus infection as a reason for pressing ahead with its controversial plan to build “closed” camps for asylum seekers.’ Photograph: Ivan Romano/Getty Images

In France, Marine Le Pen has used the spread of the coronavirus to make a renewed call to close France’s frontier with Italy, effectively suspending the Schengen agreement on open borders. Leaders of far-right parties in Germany and Spain have echoed the sentiment. This runs contrary to the World Health Organisation’s current advice on how to contain the spread of the virus, but for these politicians disease control is only the latest reason to attack freedom of movement, alongside terrorism and the movement of asylum seekers.

It is essential to point out the racist assumptions that lead to ethnic groups and categories of immigrants being blamed for the outbreak of disease. As we have already seen, the origin of the new coronavirus outbreak in Wuhan has inflamed anti-Chinese prejudice in several parts of the world. But it may not stop there. When nationalists start to talk about disease, they are playing an especially ugly game. As the anthropologist Mary Douglas wrote in her landmark study Purity and Danger, human societies often reinforce group identity via taboos around cleanliness and pollution. In her definition, dirt is anything that a community regards as “matter out of place”. In the nationalist imagination, “out-of-place” people – immigrants, religious and ethnic minorities, marginalised social groups – are frequently recast as a polluting influence. This has divisive and deadly consequences.

In Italy, which has the highest number of coronavirus cases in Europe so far, public unease is becoming a moral panic, stoked by outlandish claims in traditional and online media. “The government is helping the spread of the virus”, ran a recent headline in the rightwing daily newspaper Libero. “For Conte and his scientists, racism [directed at people of east Asian origin] is the disease, not coronavirus.” Other media outlets have declared a “hunt” for “patient zero”, the first to bring the virus into the country. This dovetails with a broader atmosphere in which elites are mistrusted and conspiracy theories circulate widely.

Italy is hardly alone in that respect. The conditions that provide fertile ground for rightwing populism are also those in which a vicious backlash to the spread of disease can develop. A botched official response to the new coronavirus will not only threaten our health but risks inflaming public fears as well. When politicians come under pressure for their failures – Donald Trump, for instance, fired the US government’s entire pandemic response chain of command in 2018 – they will be tempted to look for other people to blame. This week, the Fox News anchor Tucker Carlson claimed that “wokeness” had helped spread the virus. “They’d let you die before they admitted that diversity is not our strength.”

Effectively countering this nationalist rhetoric will require more than simply condemnation and mythbusting. While in the short term the response to disease outbreaks needs to be led by public health experts, it’s also important to try to make our social welfare systems more resilient in the long run, and increase people’s trust in them.

When I think about Augusta, in Sicily, which I often visited in the course of my reporting, I don’t only think of the photo. I think of the time I saw a crowd of people receiving medical supplies from a Red Cross booth. They weren’t refugees; they were Italians who had been shut out of healthcare by poverty. If we allow politicians to play one of these groups off against the other, all of us will lose.

• Daniel Trilling is the author of Lights in the Distance: Exile and Refuge at the Borders of Europe