LUDZ, Poland — Andrzej Kompa, a Polish historian appalled by his government’s past denunciations of migrants as a disease-carrying menace, was pleasantly surprised when Poland opened its arms this year to millions of people fleeing war in neighboring Ukraine.
“Polish society responded with unprecedented generosity. It was fantastic,” he said. “We could all feel pride in our country.”
A less welcome surprise, however, was the Facebook message he found while looking at posts from his hometown, Ludz, from people trying to get rid of unwanted household items. It offered a free washing machine to anyone so long as they were “not Ukrainians.”
Shocked at what he took to be overt discrimination, he posted a tart reply, asking whether this was any different from putting up a sign in public transport saying, “seats for whites only” or a restaurant telling customers that “Jews are not allowed.”
A heated online polemic followed. Some people shared Mr. Kompa’s outrage, while others asked why the historian did not buy a washing machine himself and give it to Ukrainians, and why Ukrainians “keep getting more than we do.” The original Facebook message and subsequent comments then vanished.
The fracas, Mr. Kompa said, did not detract in a serious way from what he described as Poland’s “overwhelmingly positive response” to Ukrainians, nearly 1.5 million of whom have registered in the country as refugees and, for the moment at least, are staying.
But, he added, bursts of anti-Ukrainian sentiment from “an aggressive and vocal minority” do highlight signs that, as the war in Ukraine grinds on, fatigue and, in some quarters, even anger are setting in as Poles increasingly turn to their own problems at a time of rising inflation, now around 18 percent — just as Poland faces a new influx from the war-ravaged country.
Around 20,000 people now arrive in Poland each day from Ukraine, a number sometimes matched or exceeded by those going in the opposite direction. But the prospect of a cold, miserable winter in Ukraine without electricity or water could set off a new exodus, or at least deter those who fled earlier from going home.
Ruslana Medvedeva, who fled to Poland from Kharkiv in eastern Ukraine at the start of the war with her mother, daughter and sister-in-law, said they had planned to return home but dropped that idea this month after receiving a phone call from a relative still in Kharkiv. “Don’t come back. There is no power,” Ms. Medvedeva said she was told.
A Polish couple who put them up for months, she said, started pocketing a daily allowance from the Polish state instead of buying them food. Now, Ms. Medvedeva and her family have taken refuge in a church in Ludz, a city in central Poland that has taken in 110,000 Ukrainians and recently saw a surge in new arrivals.
After a steep decline over the summer, the number of Ukrainians registering for Polish identification numbers in Ludz has picked up sharply in recent weeks, rising to more than 1,500 a month from just a few dozen. This is still far fewer than a peak of 7,000 in March, but it is a clear sign that Poland’s provision of what began as temporary relief is becoming a long-term condition.
The strain on Poland has been immense, with 7.6 million people arriving across the border with Ukraine since Russia invaded in February. Most have since moved on to other countries or returned home, but Poland has still borne the brunt of Europe’s biggest exodus since World War II.
The movement of people has been far bigger than during Europe’s migrant crisis in 2015, when governments across the continent struggled to cope with 1.2 million Syrians and Afghans fleeing war and economic migrants fleeing poverty in the Middle East and Africa.
Instead of refusing to lend a hand, as the Polish government did in 2015 when it balked at taking part in a European Union program to spread just 160,000 asylum seekers among 28 member nations, Poland has amazed Ukrainians and even itself with displays of generosity.
A recent study by the Polish Economic Institute found that 77 percent of Poles took part one way or another in efforts to help fleeing Ukrainians in the early months of the war.
By the end of the year, Poland will have spent $8.3 billion on housing, health and other services for Ukrainians, the highest in Europe.
Most of the heavy lifting, however, has been done by volunteers and local governments, many of which, like Ludz, are controlled by political opponents of the right-wing governing party in Warsaw, Law and Justice, a populist force long known for its opposition to migrants.
Hanna Zdanowska, the city’s mayor, said that “you see Ukrainians everywhere here,” but that “there are no visible signs of a backlash.” And she insisted that the “predominant attitude of people has been one of kindness, generosity and openness.”
Dismissing the Facebook furor over the washing machine as the work of “people looking for trouble,” Ms. Zdanowska lamented that “stuff published on social media often does not reflect any actual social reality” and said that she paid “zero attention to such posts.”
Whatever their own immediate economic worries, the mayor added, the vast majority of Poles still want to help because they understand that “if the Ukrainians were not fighting Russia in their country, we might now be fighting Russia for our own country.” Providing a safe refuge for women and children from Ukraine, she said, “helps on the front line” against Russia.
Mr. Kompa, a longtime critic of what he called the “engineering of fear” by Poland’s government against migrants from the developing world, said race and religion played a role in the discrepancy of treatment, but the main factor was that “a large group of Poles understand that Ukraine is fighting for Poland and for Europe.”
Some people, though, think the public mood is shifting and warn of a serious backlash. “At the start of the war, everyone helped; if you did not help, your neighbors would think you were a bad person,” said Oktawia Braniewicz, a researcher at the Center for Migration Studies at the University of Ludz. “But now people are tired and don’t understand why we are supporting Ukraine so much.”
Grumbling about Ukrainian refugees, she added, is on the rise as they are no longer seen as “poor and tired mothers with kids at the train station, but women who shop in our stores and take our places in the queue while their children take our children’s places at the kindergarten.”
Lyudmilla Ivanchenko, a Ukrainian nurse who fled to Poland at the start of the war along with her 10 cats, said she understood why some Poles were growing tired. A Polish woman and fellow cat-lover in Ludz who had given her and her animals a place to live recently asked her to find somewhere else. “She had warned me that she could not feed me and my cats forever,” Ms. Ivanchenko said.
Grateful all the same for months of help, Ms. Ivanchenko added, “I thank her immensely.”
To try to maintain the solidarity that bound Ukraine and Poland so tightly when Russia first invaded, Iuliia Puzyrevska, a longtime Ukrainian resident of Ludz who speaks fluent Polish, set up a group called We Support Ukraine Together. Its recent events included a performance by Ukrainian children on Poland’s Independence Day, Nov. 11, featuring banners and songs thanking Poland.
She said it was perhaps inevitable, after eight months of war, that some Poles struggling with their own economic problems might show less enthusiasm for helping Ukrainians, but she insisted she had encountered no signs of hostility, only remarkable generosity.
She has moved her organization into new offices provided for a minimal rent by a local property company, which also threw in a big space for no cost to store donations of food and clothing.
Roman Barnowski, a Baptist pastor in Ludz, has made 18 trips to the Ukrainian border since February to deliver food, clothing and other assistance to fleeing civilians, and turned his church into a shelter for refugees.
But, he said: “Enthusiasm is now slowing down. People can’t afford to help like they could before. They are struggling to meet their own needs so they don’t give as they used to.”
Anti-Ukrainian sentiment, the pastor said, is still rare, a surprise given the two country’s often troubled history, which includes the massacre of tens of thousands of Poles by Ukrainian nationalists before and during World War 11.
Hard-line Polish nationalists have used memories of those killings to stir up hostility to refugees but have won little public support. “There are bad people as well as good people in Poland, just as there are everywhere else,” Mr. Barnowski said.
Mr. Kompa, the historian, said he lost several relatives to violent Ukrainian nationalists and showed an old family photograph from the 1920s that included two of the victims, his great grandaunt and her husband. “But this is just history for me,” he said. “It is much more important to help living people today.”
Anatol Magdziarz contributed reporting from Warsaw.