Slovenia clamped down its borders to migrants Wednesday, setting off a wave of similar responses from other countries along what has been the main migration route into Europe amid the continent's ongoing refugee crisis.
Slovenia's borders - on highways, roads and airports - remain open, but only to people allowed to regularly traverse the 26-nation, passport-free Schengen area, of which Slovenia is part.
"The intent is exactly that - to fully restore the functioning of the Schengen regime and stop the building of borders within the Schengen area," Prime Minister Cerar told state TV late Tuesday.
He added that the country will only allow 40-50 asylum seekers per month to enter through an EU refugee relocation scheme, until a total of 567 are in the country.
The measure triggered a chain reaction in Croatia, Serbia and Macedonia, all of which have now also sealed their borders to the migration flow, leaving tens of thousands of people stranded in Greece, where most migrants enter the European Union to continue on to wealthier countries in Northern Europe.
EU President Donald Tusk welcomed the developments, thanking the Western Balkan countries for implementing part of the bloc's strategy to deal with the migration crisis.
"Irregular flows of migrants along [the] Western Balkans route have come to an end," Tusk wrote on Twitter, noting that these were not "unilateral" actions but part of a common EU approach.
Countries on the Balkan route leading from Greece to Northern Europe began shutting down the migration flow several weeks ago.
The latest set of restrictions dashes the hopes of virtually all those already in the Balkans of legally reaching wealthier part of Europe to seek asylum there, while also raising the prospect that people could start looking for alternative migration routes.
Hungary - which was on the main migration course until it sealed its border mid-October - on Wednesday declared a crisis situation for its entire territory, expanding police authorities.
Interior Minister Sandor Pinter said that migrants stranded in Serbia and Croatia may again turn toward Hungary in an attempt to continue north and west. The UN refugee agency estimates that some 2,500 migrants are caught in Serbia and Macedonia.
In Greece, the number of stranded migrants rose Wednesday to nearly 36,000, the national crisis management body said.
The people - many of them asylum seekers from war zones in Syria and Iraq - continued arriving by sea from Turkey.
Migrants massed at a makeshift camp at Idomeni, on the Greek border with Macedonia. Official Greek estimates put the number of people stuck at the fenced-off border at 8,550, while international aid organizations said it was up to 14,000.
The rest were scattered across Aegean islands, waiting for ferries to Athens, and in camps and reception centres between the capital and the border, 600 kilometres north.
Their future is uncertain, as the EU and Ankara negotiate a scheme to return migrants from Greece to Turkey, while the bloc would directly take in Syrian refugees from Turkey. The deal would likely only apply to new arrivals.
Europe is being consumed by a fierce debate about the understanding that EU leaders reached with Turkey during 12 hours of talks on Monday.
The plan, which still needs to be finalized, has been attacked by rights groups and EU parliamentarians who view it as inhumane and have questioned its legality under European and international law. But top EU officials defended the approach Wednesday.
"The aim is not simply to stop refugees from coming - the aim is to move from irregular to legal, controlled migration; the aim is to put an end to people dying at sea," said Dutch Defence Minister Jeanine Hennis-Plasschaert, whose country holds the rotating EU presidency.
"We cannot and will not cut corners when it comes to our legal obligations," the minister stressed, while adding that "the moral high ground is a luxury we cannot afford."
EU Neighbourhood Policy Commissioner Johannes Hahn said that, while long-term, global solutions are needed for the conflict in Syria and ensuing migration flows, Europe must also "face reality," and deal with the immediate crisis at its borders.
He insisted, however, that any lowering of EU visa requirements for Turkish citizens and progress in the country's membership bid - both offered under the deal - would not be "at the cost of standards, of principles, of respect for human rights."