Macedonia has said it will no longer let any migrants through its border with Greece, effectively blocking the Balkan route north.
The decision came after Slovenia barred access to migrants transiting the country. Croatia and Serbia then said they would follow suit.
Some 13,000 migrants are now stranded at the Macedonia-Greece border.
The moves come after the EU and Turkey set out a plan to ease Europe's biggest refugee crisis since World War Two.
Under the plan, still to be finalised, all migrants arriving in Greece from Turkey would be sent back. For each Syrian returned, a Syrian in Turkey would be resettled in the EU.
Announcing the plan on Monday, European Council President Donald Tusk, said there would no longer be a path to Europe for migrants. "The days of irregular migration to Europe are over," he said.
In another development, leading international non-governmental organisations accused the French government of planning to close a purpose-built camp for refugees and migrants outside the French town of Dunkirk.
The newly-opened site has been described as the first in France to meet international standards, and provides shelter, food, sanitation and medical care for almost 1,200 people, but officials have said they are concerned about security and potential fire hazards.
More on the migrant crisis
Hundreds of thousands of migrants have travelled through Macedonia over the past year, heading north.
But Macedonia began to limit the numbers, first to Syrian, Afghan and Iraqi migrants, then recently to just a trickle - mainly Syrians from areas it considered conflict zones.
This created a bottleneck, with migrants now living in a sprawling camp at the Idomeni crossing.
Macedonia's announcement came after Slovenia said late on Tuesday that it would allow in only migrants who planned to seek asylum in the country, or those with clear humanitarian needs.
Slovenian Prime Minister Miro Cerar said the country's move meant that "the Balkan route for illegal migration no longer exists".
In related moves:
- Serbia said it would close its borders with Macedonia and Bulgaria to those without valid documents because it could "not afford to become a collection centre for refugees"
- Croatia said it would close its borders to migrants as a "new phase in resolving the migrant crisis"
- Sebastian Kurz, the foreign minister of Austria, welcomed "the end of the 'waving through' [of migrants] which attracted so many migrants last year and was the wrong approach"
- Hungarian Interior Minister Sandor Pinter said he would send more police and soldiers to patrol the country's southern borders and would make preparations to erect a fence along its border with Romania - if necessary within 10 days
The BBC's Europe correspondent, Chris Morris, says other countries such as Albania and Bulgaria will be wary of attracting attention as alternative routes for refugees and smugglers alike.
There is also concern, he adds, that there could be a renewed flurry of smuggling activity before any proposed deal between the EU and Turkey comes into force.
The closure of the Balkan route had clearly been on the agenda of the EU-Turkey summit on Monday, which ended without a deal.
A draft statement had declared the route closed although the final wording was changed after Germany objected.
The main thrust of the EU-Turkey plan is the one-in, one-out proposal for Syrian migrants.
There have already been objections. The UN expressed concern at the plan on Tuesday, while Amnesty International called it a death blow to the right to seek asylum.
Speaking to the BBC, Thorbjorn Jagland, Secretary General of the Council of Europe, said the proposal to send migrants back would contravene international law.
Talks between the EU and Turkey will continue ahead of an EU meeting next week.
What's in the EU-Turkey proposal?
The EU heads said "bold moves" were needed, and made the following proposals:
- All new irregular migrants crossing from Turkey to Greece will be returned to Turkey. Irregular migrants means all those outside normal transit procedures, ie without documentation.
- In exchange for every returned Syrian, one Syrian from Turkey will be resettled in the EU
- Plans to ease access to the EU for Turkish citizens will be speeded up, with a view to allowing visa-free travel by June
- EU payment of €3bn ($3.3bn; £2.2bn) promised in October will be speeded up, with the possibility of further aid to help Turkey deal with the crisis. Turkey reportedly asked for the sum to be doubled
- Preparations will be made for opening new chapters in talks on EU membership for Turkey
A note on terminology: The BBC uses the term migrant to refer to all people on the move who have yet to complete the legal process of claiming asylum. This group includes people fleeing war-torn countries such as Syria, who are likely to be granted refugee status, as well as people who are seeking jobs and better lives, who governments are likely to rule are economic migrants.