Poland, the largest European Union nation to border Ukraine, is making preparations to accept Ukrainian refugees in the event of another Russian attack on that country. But the Polish government hopes that worst-case scenario can be averted.

Similar preparations are being made across the region, particularly in those nations which share borders with Ukraine.

Also read: Brazil President Jair Bolsonaro departs for Russia despite objections

As other countries draw down their diplomatic missions in Ukraine, Poland says it is for now keeping its diplomatic operations in place in case they are needed to facilitate a large-scale exit of Ukrainians.

Poland, which has welcomed large numbers of Ukrainian economic migrants in recent years, particularly after Russia’s incursions into Ukraine in 2014, has been making plans for weeks to accept refugees if it comes to that, said Marcin Przydacz, a deputy foreign minister.

Also read: Russia will attack on Wednesday, February 16: Ukraine President

While Poland has an image of being staunchly anti-refugee, that opposition is largely based on not wanting to take in large numbers of people of different religious and racial backgrounds.

Ukrainians — who like Poles are a Slavic people with a similar language and customs — have filled gaps in the labor market and have been largely welcomed in Poland in recent years.

Przydacz said in a radio interview on Monday that Poland hopes the situation in Ukraine won’t escalate, but that the country was preparing for any possibility, including the possibility of large numbers of refugees.

“In this worst-case scenario, we are not talking about hundreds or thousands, but much larger numbers,” Przydacz said on Radio Plus.

He added that the Interior Ministry has been preparing “internal scenarios, infrastructure and plans” for many weeks.

Also read: Secretary of State Antony Blinken announces closure of US Embassy in Kyiv

The plans would include housing refugees in hostels, dormitories, sports facilities and other venues.

Local officials, including town mayors, have been asked to draw up reports of what facilities they could make available, according to Krzysztof Kosiński, the mayor of Ciechanow, a Polish town near the border with Ukraine, and the secretary of the Association of Polish Cities.

Ukraine, which is bordered by Belarus to the north and Russia to the east, also shares borders with the EU nations of Poland, Slovakia, Hungary and Romania, as well as the non-EU state of Moldova.

Hungary’s nationalist prime minister, Viktor Orban, warned Saturday that a Russian invasion of Ukraine could send hundreds of thousands of Ukrainian refugees fleeing across the border into his country.

Meanwhile, Slovakia is also preparing for a wave of refugees in the case of a conflict. The government has prepared a plan what to do in such a scenario, but it is classified.

Also read: Ukraine continues to pursue NATO membership despite Russia’s anger

“According to the existing studies and analysis, I can say that even a limited Russian military attack on Ukrainian territory would mean tens of thousands of refugees crossing our border,” Slovakian Defense Minister Jaroslav Nad said.

Nad said those fleeing a war would receive refugee status.

“From the European continent’s perspective, the current situation is the most dangerous since World War II,” Nad said.

Czech Interior Minister Vit Rakusan has offered to send police officers to help Slovakia in the case of such a conflict.