A year ago, Russia’s military onslaught on Ukraine sent millions of refugees fleeing west, often to countries wary of taking in foreigners, raising fears of a repeat of the political convulsions set off by a migration crisis in 2015 that involved far fewer people.
But the paradox of foreigner-leery governments taking in huge numbers of Ukrainians has been especially stark in Poland, long one of the world’s most ethnically homogeneous countries with a deep-seated mistrust of outsiders and a tangled, often painful history with Ukraine.
Since Feb. 24 last year, when Russia invaded Ukraine, Poland has recorded nearly 10 million crossings across its frontier with Ukraine into Polish territory. President Biden, on a visit to Poland on Tuesday, paid tribute to that feat in a speech in Warsaw. “God bless you,” he said.
To understand this open-armed response in a country that just before the war started was beating back asylum seekers trying to sneak in from neighboring Belarus, consider the change of heart Ryszard Marcinkowski, 74, a retired Polish railway worker, experienced.
He grew up with horror stories about the brutality of Ukrainian nationalists told by his parents and aunt, all refugees from formerly Polish lands in what, since World War II, has been western Ukraine.
Yet when millions of Ukrainians started arriving in Poland last February, Mr. Marcinkowski drove to the border to deliver food and other supplies.
“I had a very bad image of Ukrainians from my family but realized that I had to help them,” Mr. Marcinkowski said. “For Poland,” he added, “Russia has always been the bigger evil.”
Since the war began, the Polish authorities have recorded 9.8 million crossings into Poland from Ukraine. That includes multiple crossings back and forth by some people and others who left quickly for other countries. But Poland, according to Prime Minister Mateusz Morawiecki, is now sheltering around two million Ukrainians, down from more than five million last year but still more than the population of Warsaw, the Polish capital.
Some far-right politicians, Mr. Morawiecki said in an interview on Tuesday, “are trying to create noise and animosity between Poles and Ukrainians” but “they failed.” Instead of being a burden or a threat, he said, the influx “will strengthen Poland demographically” and “enrich our culture.”
“I wish Ukraine well, but if people who came here would like to stay, they will after some time have permanent documents and will be able to stay and will make us stronger from many different angles,” the prime minister said.
Rebuilt from ruins after 1945 amid seething hostility to Germans, Russians and Ukrainians, Poland has accommodated far more refugees from neighboring Ukraine than any other country. Germany is next with about a million.
Poland’s response to the refugee situation in Ukraine has won plaudits from the European Union and has given its right-wing government more clout, offsetting its previous reputation as a troublemaker because of what the bloc’s executive arm in Brussels views as moves to undermine the independence of the Polish judiciary and discriminate against L.G.B.T. people. But long-running disputes with Brussels still rumble on.
In the early days of the war, those fleeing the war in Ukraine, mostly women and children, surged into eastern Polish towns across the border. But as hopes of a swift end to the fighting faded, nearly all moved farther west, eager to find a place to live and work.
Refugees, largely dependent on the charity of strangers for food and shelter, are now often residents fending for themselves. Few have permanent residency status but many have jobs with Polish companies and children in Polish schools. All have access to Polish health care and other services.
The scale of change in Poland is particularly evident in the western city of Wroclaw (pronounced VROTZ-waf), the formerly German city of Breslau. Ethnically cleansed of Germans after 1945 and repopulated with ethnic Poles, many of them refugees from lost territory in Ukraine, the city long boasted that “every stone in Wroclaw speaks Polish.”
Now, local officials say, more than a quarter of Wroclaw’s population speaks Ukrainian and or Russian, and around 20 percent of school students are from Ukraine. It has more than a half-dozen grocery stores and two supermarkets run by Ukrainians that sell mostly Ukrainian food, like Kyiv cake and patriotic boxes of candy called “Everything Will be Ukraine.”
The presence of what officials put at around 250,000 Ukrainians in a city that before the war had a population of 640,000 has not gone down well with everyone.
At a soccer game in the Wroclaw stadium in October, a group of fans hoisted a big banner reading: “Stop the Ukrainization of Poland.”
But this, said Radoslaw Michalski, the official coordinating Wroclaw’s refugee response, reflected only a “marginal fringe.” He said the public had mainly rallied to support Ukrainians, an outpouring of generosity he compared to the grass-roots mobilization during catastrophic floods that engulfed the city in 1997, a calamity featured in the Netflix series “High Water.”
“As happened during the flood, people mobilized spontaneously not to fight someone but to help their city,” he said. In the early days of the war, more than 4,000 Wroclaw residents volunteered to help Ukrainians arriving by rail.
“Nobody coordinated things in the beginning,” Mr. Michalski said. “It was spontaneous.”
New arrivals by train in Wroclaw from Ukraine, which peaked at 12,000 on a single day last March, has slowed to a trickle of around 20 people a day, said Yurii Matnenko, who oversees a reception center at a station run by Fundacja Ukraina, a charity that has shifted from focusing on finding Ukrainians shelter to helping them find work and navigate Polish bureaucracy.
“Everyone thought the war would end in a month or two but now sees this did not happen, so they need to get jobs,” he said.
Most Ukrainians say they eventually want to go home, a desire encouraged by the government in Kyiv, the Ukrainian capital, which offers online learning for refugee children so they can keep up with the Ukrainian curriculum.
Veronika Goncharuk, who arrived in Wroclaw in April from Kharkiv in northeastern Ukraine with her husband and three children, is keeping her options open, enrolling her two sons and her daughter in a Polish state school and also in online Ukrainian classes.
But she said it probably made more sense “for the sake of my children” to settle in Poland because “with a neighbor like Russia, Ukraine will never be at peace.” Her husband has found a job as an electrician.
For the moment, the family lives for free in a single room at a former college dormitory.
The children have learned Polish, though Anastasia, 10, lamented that her only friend at school was a fellow Ukrainian girl, Katya, who got sick recently and left her friendless in class. Polish classmates, she said, do not pick on her for being Ukrainian but “leave me sitting alone. I really miss Katya.”
Igor Czerwinski, a Polish language teacher at a Wroclaw school that has taken in 150 Ukrainian students in addition to 250 Polish pupils, said he had heard grumbling from fellow staff members about the strain brought on by the influx of foreigners.
An ethnic Pole born in Kazakhstan, he speaks Russian as well as Polish, attends an Orthodox church in Wroclaw filled with Ukrainian worshipers and celebrates the “positive energy” brought to the city by so many refugees hungry to succeed. Ukrainians, he said, are among his best students.
As the war grinds on, Ukrainians in Wroclaw are no longer fleeing for their lives but, often helped by Polish-speaking compatriots who emigrated before the war, trying to settle down. At the city’s civil affairs office last week, two Ukrainians from Odesa got married in a ceremony presided over by a Polish clerk assisted by a Ukrainian translator. Both the bride and the groom found work at a battery factory and, according to the bride, Elena Poperechna, “have decided we want to live in Poland.”
Grzegorz Hryciuk, a history professor at the University of Wroclaw, said the influx of Ukrainians mirrored the arrival in Wroclaw more than eight decades ago of hundreds of thousands of ethnic Poles from lost Polish territories in western Ukraine, formerly eastern Poland.
Many of these Polish refugees, he said, harbored a deep hatred of Ukrainians, whom they blamed for massacres before and during the war, as well as hope of returning swiftly to their former homes in and around formerly Polish cities like Lviv. Slowly though, “they adjusted to reality,” the professor said, and made new lives in exile.
That pattern is now starting to repeat, only with ethnic Ukrainians instead of ethnic Poles, raising questions about whether and how long cities like Wroclaw and the Polish state can handle a drastic demographic and ethnic shift. Poland, which resisted taking in people from the Middle East and Africa in 2015, has mostly welcomed Ukrainians, who, said Professor Hryciuk, benefit from the fact that “in their appearance and customs they are not that different from Poles. They are not an other.”
There is still some concern that the influx could create an opening for extremist nationalist groups to the right of Poland’s governing Law and Justice party, itself a deeply conservative political force that campaigned in the past on promises to keep out foreigners.
But Przemyslaw Witkowski, an expert on far-right extremism from Wroclaw who teaches at Collegium Civitas, a private university in Warsaw, said Poland’s extreme nationalist fringe was currently split over the war and refugees from Ukraine.
Ultrareligious groups like one called Confederation, he said, look to Russia as a bulwark against secular Western values and denounce the “Ukrainization” of Poland, while groups with neo-Nazi, pagan leanings support Ukrainians “because they are white, they are Slavs and they are against Russia.”
Neither, he added, has gained much traction with the general public, in part because “it is hard to create serious tension when people have jobs.” The unemployment rate in Wroclaw is under 2 percent.
Lukasz Kaminski, the director of the National Ossolinski Institute, an institution promoting Polish culture that moved from Lviv to Wroclaw in 1945, said the nationalist ideal of an entirely Polish Poland was now finished.
“Everything has changed because of the war,” he said, describing the influx of Ukrainians as a return to Wroclaw’s roots in the Middle Ages as a “mixed land” of Germans, Poles, Jews and other ethnic groups. “Single nation Poland was always artificial — against our history and against our past experience,” he said.