The main railway station in the Hungarian capital, Budapest, has opened its doors to hundreds of migrants after a two-day stand-off.
People could be seen pouring up the steps towards the platforms after the station doors were opened.
But a public announcement said international trains to Western Europe were suspended "indefinitely".
It came as Hungary's anti-immigrant Prime Minister Viktor Orban was in Brussels for talks on the crisis.
The migrants stuck at Budapest's Keleti station were prevented from boarding trains on Tuesday and Wednesday. Some were involved in scuffles with police.
They had bought tickets after Hungary briefly appeared to abandon efforts to register migrants, allowing huge numbers to board trains to Vienna and southern Germany.
It was not immediately clear why authorities decided to let the migrants enter the station on Thursday morning.
Many tried to cram into a train that was listed as destined for Munich but the BBC's Nick Thorpe reports from the station that word was spreading that people would not be allowed to travel on to Germany.
A message on an announcement board said international tickets would be accepted on internal trains.
The number of migrants entering Europe has reached record levels, with 107,500 arriving in July alone.
Germany expects to take in 800,000 migrants this year - four times last year's total.
The surge in numbers has created tension and disagreement over EU migration policy.
On Wednesday, Germany, Italy and France called for "fair distribution" of refugees throughout the EU.