The first group of migrants has reached Croatia - a new route to northern European Union countries, a day after Hungary sealed its border with Serbia.
About 150 migrants crossed into the EU country from neighbouring Serbia.
Croatia says it is ready to receive them "or direct" them to where they want to go. Many migrants - mainly Syrian - are hoping to reach Germany.
New border restrictions and a row over allocating migrants have shown bitter divisions in Europe over the crisis.
Hundreds of migrants remain stranded outside or in makeshift tents close to the Serbian border with Hungary.
On Tuesday, Hungary declared a state of emergency in the area, with hundreds of army and police deployed to enforce new laws making it an offence to breach a razor-wire border fence.
Police sealed a railway crossing point near Roszke which had been used by tens of thousands of migrants to enter the European border-free Schengen zone.
The move has all but stopped the inflow. On Wednesday, Hungarian police said they had detained 367 migrants entering illegally - and the first criminal proceedings have been launched.
The EU's border agency says more than 500,000 migrants have arrived at the EU's borders this year, compared with 280,000 in 2014.
Many are fleeing conflict and poverty in countries including Syria, where a civil war has been raging since 2011.
The migrants have been crossing from Turkey, with about about 1,000 in the city of Edirne on Wednesday, waiting to organise a crossing into Greece. Their journey would then take them to Macedonia and Serbia.
Until Monday, most poured into Schengen member Hungary and crossed into Austria to reach Germany. Both Germany and Austria have introduced tighter border controls to control the flow.