Thousands of Ukrainians queued in long lines on Friday at the last three border crossings with Poland that remain open to get to their homeland before Ukraine closes its borders due to the coronavirus pandemic.

“We are observing an exodus of Ukrainian citizens in recent days with 3,500 to 5,000 people leaving Poland via the Korczowa crossing a day,” said Major Elzbieta Pikor, a regional spokeswoman for the Polish border guard.

“The main reason why they are leaving is the pandemic. Many of them have been working in hotels, restaurants, but their jobs are being put on hold, so they are coming back to their families, to their homeland,” Pikor said.

Around 3,500 people were lined up at the Korczowa crossing in southeastern Poland, 74 km (46 miles) west of the Ukrainian city of Lviv, to get through the border to Ukraine.

Between one and two million Ukrainians are estimated to live or work in Poland. Many Ukrainian workers, who plug labor gaps in industries like construction and farming, enter Poland on temporary visas for a few months at a time and then return home.

Poland last week closed its borders to foreigners in an effort to curtail the spread of the coronavirus. On Friday night Ukraine is to close its borders too, so many Ukrainians are trying to get home out of fear that the border barriers will be closed for good.

The last charter flights carrying Ukrainians coming back from abroad are landing home on Friday. But authorities in Kiev have said that all citizens coming back from Poland who manage to get to the border will be allowed to cross it entering Ukraine also after Friday.