DUBAI, United Arab Emirates — The spectacle of a mass flight out of Ukraine was resonating deeply in the Middle East on Saturday, with many taking to social media to express their sympathy and to commiserate with the plight of those now forced to flee their homes amid a Russian military invasion.
But in a region that has been plagued by seemingly endless wars, the empathy was tinged with bitterness from some who saw European nations taking a more compassionate stance toward the Ukrainians than they had in recent years toward Arab and Muslim migrants trying desperately to reach the safety of Europe’s shores.
Images of ravaged cities from Syria and Iraq to Libya and Yemen circulated online, with memes and comments accusing Western democracies of stoking violence and destabilizing these countries while evading responsibility and applying double standards, especially in their treatment of refugees.
As neighboring European countries swiftly opened their borders to tens of thousands of Ukrainians, many social media users were quick to point out how refugees from the Middle East had faced a harsher reception.
“Imagine the human face of Ukrainian refugees is also seen on MENA’s refugees,” tweeted Lina Zhaim, a communications manager from Lebanon, referring to the Middle East and North Africa region. “Imagine sovereignty & dignity as human rights not bound by race or nationality.”
Not a few commenters acknowledged that some European countries had been generous in resettling Middle Eastern migrants. A wave of asylum seekers from the wars in Syria and Iraq made their way to Europe in 2015 and 2016 and the European Union took in more than a million refugees over that two-year period, most of them Syrians, with Germany receiving the bulk.
But Arab critics said that migrants from Muslim and Arab countries were often deemed a threat, rejected and at times confronted with force and violence as they tried to enter Europe.
“What’s happening in Ukraine is incredibly tragic and heart wrenching to watch,” said Rana Khoury, a Syrian-American postdoctoral associate researcher who focuses on the study of war and displacement at Princeton University. “But like many others, I also saw how these same countries who have put up so many obstacles to refugees fleeing conflicts in the Middle East open their borders to Ukrainians.”
In November, Polish security forces beat back migrants from the Middle East and Afghanistan with batons as they tried to get across the border.
In contrast, refugees arriving from Ukraine at the Polish border over the last few days were greeted with smiles, hot drinks and transported to railway stations.
Ayman Mohyeldin, an Egyptian-American television host on MSNBC with hundreds of thousands of followers on social media, said in a Twitter post, “So what you’re saying is that Europe knows how to humanely and compassionately welcome a large and sudden influx of refugees escaping war?”
Unlike Middle Eastern migrants, Ukrainians are allowed to enter European Union countries without visas. And nearly one million already live in Poland.
Ms. Khoury, while acknowledging the generosity of some European countries like Germany in taking in Middle Eastern migrants, said she saw an apparent bias.
“There are these justifications that somehow war and violence are endemic to the Middle East in ways that they are not to Europe,” she said, adding that Middle Eastern and African countries with much lesser capacities are left to host “many more refugees all the time.”
Many Syrians who oppose the government of President Bashar al-Assad watched the invasion of Ukraine with particular interest, having personally experienced a Russian military intervention in their country that destroyed cities and displaced huge numbers of people.
Some posted images on social media of lines of cars fleeing an advance by Russian-backed Syrian forces two years ago next to photos of lines of cars fleeing the Russian invasion of Ukraine.
More than 5.6 million Syrian refugees remain in the Middle East, most of them in Turkey, Lebanon and Jordan. Of those who have made it to Europe, most effectively forced their way in, crossing the Mediterranean on flimsy boats that sometimes sank, killing their passengers.
Understand Russia’s Attack on Ukraine
What is at the root of this invasion? Russia considers Ukraine within its natural sphere of influence, and it has grown unnerved at Ukraine’s closeness with the West and the prospect that the country might join NATO or the European Union. While Ukraine is part of neither, it receives financial and military aid from the United States and Europe.
Once in Europe, many found that countries sought to shut their borders.
During the 10 years of war in Syria, the United States let in about 22,000 Syrian refugees.
Jomana Qaddour, a senior fellow at the Atlantic Council who focuses on Syria, said there is a tendency to blame Middle Eastern violence on the region’s culture.
On Saturday, one clip contrasting Ukraine with two predominantly Muslim countries ravaged by war appeared to go viral, setting off a firestorm of criticism.
Describing the flight of tens of thousands of Ukrainians, a CBS reporter expressed a sense of shock, saying, “But this isn’t a place, with all due respect, like Iraq or Afghanistan that has seen conflict raging for decades.”
The reporter, Charlie D’Agata, went on to describe the scenes he witnessed taking place in a “relatively civilized, relatively European” city.
Hwaida Saadand Ben Hubbard contributed reporting from Beirut and Nada Rashwan from Cairo.