In the small town of Kroscienko, Poland, on the border with Ukraine, hundreds of cars have continuously lined the road as ordinary Polish people wait to welcome refugees. Massive piles of donated food, water, clothing and children’s toys are overseen by volunteers. Across the country, hundreds of thousands of people have opened their homes to those fleeing the carnage of Russia’s invasion.

These scenes, repeated all along the Polish-Ukrainian border and in other European countries bordering Ukraine, are nothing short of marvellous. Political leaders across the world, even as far away as Australia, have encouraged these acts of basic solidarity and promised to provide special protection for Ukrainians in their countries. Sympathy for Ukrainian refugees is promoted in the Western media as unquestionable—as it should be. This is exactly how refugees from every conflict and crisis should be welcomed.

Yet it is impossible not to view all this without recognising a stark contrast between the treatment of refugees from Ukraine and those from Syria, Iraq, Afghanistan and elsewhere.

How can we understand and explain the double standard? Blatant racism is certainly a feature. This has bubbled to the surface in media coverage. On BBC News, a reporter described being emotional because “I see European people with blue eyes and blonde hair being killed”. On CBS News, the capital of Ukraine was described as a “relatively civilised” city in comparison with the cities of Iraq and Afghanistan. And as an NBC News reporter put it, “These are not refugees from Syria, these are refugees from Ukraine ... they are Christians, they are white, they’re very similar [to us]”.

Political figures have been equally discriminatory. Viktor Orbán, the Hungarian prime minister who came to power on the back of a xenophobic campaign against refugees from the Middle East and Africa, has defended his new policy of open borders for Ukrainians by declaring, “Migrants will be stopped, refugees can get all help”. In Denmark, there is a law that requires immigration officials to strip refugees of their valuables on arrival. This disgusting law, established as people fleeing civil war in Syria sought refuge in the country, is likely to be set aside for refugees from Ukraine.

The double standard is clearly racist. But the explanation for these racist statements and policies lies in the broader geopolitical framework of imperialism. People from the Middle East and Africa have long been portrayed as the menacing “other”, who can’t be trusted to live peacefully in Europe, Australia or America. This helps provide justification for the US and other imperial powers to rampage around those regions with impunity, disregarding the millions of refugees displaced by the wars and poverty the West is responsible for.

Tens of thousands of refugees have drowned in the past decade attempting to cross the Mediterranean Sea into Europe. Rather than throw open the doors to these human beings in need, governments have instead criminalised assistance to refugees in transit and opened refugee camps with a strategy modelled on that of Australia’s brutal border regime.

It’s not just Ukrainians who are treated very differently. There are many examples of Western powers opening their arms to refugees perceived to be the victims of the crimes of countries, like Russia, deemed a threat to Western interests. One of the first immigration reforms enacted by the Biden administration, for example, provided targeted relief to more than 300,000 Venezuelan people who had been staying in the US without permission. Meanwhile, tens of thousands of migrants and refugees from other South and Central American countries are detained at the border.

The double standards are clearly on display in Australia too. Prime Minister Scott Morrison has promised an increase in humanitarian visas for Ukrainians, and Victorian Premier Daniel Andrews has pledged to work with the federal government on this policy. But this welcoming stance doesn’t extend to the refugees the government continues to detain in offshore prison camps like Nauru or in makeshift detention facilities like the Park Hotel in Melbourne. If Morrison and Andrews were genuine about their concern for the plight of refugees, they would free and settle these people in the community today.

Australia’s imperial interests have been a major factor in its barbaric treatment of refugees fleeing the violence and repression of its allies. In Sri Lanka, the genocide of the Tamil people was excused and enabled by Australia. As Tamils fled persecution before, during and after a brutal civil war, the Australian government not only continued to supply military and policing equipment to the Sri Lankan government but also actively worked to prevent the arrival of Tamil refugees in this country. When they did arrive, many faced detention and even deportation back to danger.

As socialists, we reject the idea that anyone’s status as a human being deserving of our support should be dependent on their usefulness as a symbol that can be harnessed to the goals of empire. The solidarity and support currently being offered to Ukrainians fleeing Russia’s invasion should be extended to all refugees, whether from Europe, the Middle East, Africa, Asia or anywhere else.