Thousands of migrants rode trains and buses and walked through Macedonia and Serbia on Sunday in an effort to get to European Union member Hungary, where authorities are building a razor-wire fence to keep them from entering.
The migrants, mostly Syrians, Iraqis and Afghans fleeing bloody conflicts in their homelands, could travel freely throughout Europe in search of jobs and a better life if they can cross into Hungary.
The migrants had landed in debt-wracked Greece, an EU country facing its own financial turmoil.
Baton-wielding Macedonian police initially kept the wave of migrants from entering their country and heading further north, sealing the Greek-Macedonian border.
Migrants walk along the railway tracks after crossing from Greece to Macedonia, at the border line between the two countries, near southern Macedonia's town of Gevgelija, Aug. 23, 2015.
But Macedonia lifted the restrictions Saturday and by mid-Sunday 6,000 refugees and migrants had crossed into Serbia, where eight huge United Nations refugee tents were set up to provide food and shelter.
Italian Foreign Minister Paolo Gentiloni said the thousands of migrants reaching Europe's southern shores after perilous Mediterranean crossings threaten the "soul" of Europe.
"On immigration," Gentiloni told the Il Messaggero newspaper, "Europe is in danger of displaying the worst of itself: selfishness, haphazard decision-making and rows (disputes) between member states. I am very worried. Today it is on this issue that Europe will either rediscover its soul or lose it for good."
Sunday's movements followed clashes Friday and Saturday with Macedonian police who tried to block the migrants from entering the country from Greece. The government had declared a state of emergency and ordered its borders sealed to the migrants.
But thousands of people, many of them Syrian refugees, were able to run past the officers Saturday and make it to Macedonian territory after days spent in the open without access to shelter, food or water.
Authorities then lifted the restrictions and allowed migrants to cross freely, allowing them to board the trains Sunday without problems.
The issue of what to do with the number of migrants trying to access Europe has left governments and the EU as a whole debating how to respond.
The International Organization for Migration said as of last week that more than 250,000 migrants had crossed by sea to Europe this year, mostly landing in Italy and Greece.
They fled areas that have seen years of conflict and political turmoil, with Syria, Afghanistan, Eritrea and Nigeria the top countries of origin.