The mass exodus of refugees from Ukraine to the eastern edge of the European Union showed no signs of stopping Monday, with the UN estimating more than 520,000 people have already escaped Russia’s burgeoning war against Ukraine.

Long lines of cars and buses were backed up at checkpoints at the borders of Poland, Hungary, Slovakia, Romania and non-EU member Moldova. Others crossed the borders on foot, dragging their possessions behind them.

Also read: Yevhen Malyshev, 19-year-old Ukrainian biathlete, dies while fighting Russian invasion

Several hundred refugees were gathered at a temporary reception center in the Hungarian border village of Beregsurany awaiting transport to transit hubs, where they would be taken further into Hungary and beyond.

Many of the refugees in Beregsurany, as in other border areas in Eastern Europe, are from India, Nigeria and other African countries, and were working or studying in Ukraine when the war broke out.

Also read: Yevhen Malyshev, 19-year-old Ukrainian biathlete, dies while fighting Russian invasion

While Ternopil had not yet experienced violence when they left: “It might be that there is bombing next hour, next month or next year. We are not sure, that’s why we left that city.”

Hungary, in a turnaround from its long-standing opposition to immigration and refusal to accept refugees from the Middle East, Africa and Asia, has opened its borders to all refugees fleeing Ukraine, including third-country nationals that can prove Ukrainian residency.

Also read: Russia-Ukraine conflict: A brief history

As part of an agreement with some foreign governments, Hungary has set up a “humanitarian corridor” to escort non-Ukrainian nationals from the border to airports in the city of Debrecen and the capital, Budapest.

UN High Commissioner for Refugees Filippo Grandi, speaking by video to the UN Security Council, said more than 520,000 refugees had fled Ukraine, a number he said “has been rising exponentially, hour after hour.”

Also read: Roman Abramovich to sell Chelsea as West cracks down on Russian oligarchs

The UN expects the total to reach 4 million in the coming weeks, Grandi said.

In Poland, which has reported the most arrivals at more than 280,000, trains continued to bring refugees into the border town of Przemysl on Monday. In winter coats to protect them against near-freezing temperatures, many carried small suitcases as they exited the station.

Also read: New US Justice Department unit targets Russian oligarchs over Ukraine war

Polish UN Ambassador Krzysztof Szczerski, speaking at the General Assembly, said that in addition to Ukrainians, those coming in Monday included people of some 125 nationalities, including Uzbeks, Nigerians, Indians, Moroccans, Pakistanis, Afghans, Iranians, Iraqis, Turks and Algerians.