Hundreds of migrants have been protesting outside a major railway station in the Hungarian capital after police sealed off the terminal to stop them travelling through the EU.
Crowds chanted “Germany, Germany” and waved train tickets after being forced to leave Keleti station in Budapest.
Hungary is trying to restore order and enforce EU rules, officials said.
Meanwhile, German Chancellor Angela Merkel has called for the fair distribution of refugees across Europe.Austrian police said 3,650 migrants arrived in the Austrian capital, Vienna, from Hungary on Monday, with most heading for Germany.
By Tuesday morning, about 1,400 people had arrived in Munich, southern Germany, after travelling through Austria and more were expected.
Hungarian officials had earlier appeared to abandon efforts to register them under an EU rule, known as the Dublin Regulation, which says they should seek asylum in the first EU country they enter, correspondents say.
About 1,000 migrants congregated outside Keleti station, in the east of the city, as it was evacuated on Tuesday.
It was closed briefly but soon reopened to non-migrant passengers, with lines of police preventing migrants from going inside.
The BBC’s Nick Thorpe in Budapest says hundreds of migrants are circling the area trying to find a way through the guarded entrances.
The decision to allow refugees to board trains on Monday evening and early on Tuesday seems to have been a temporary one to ease the growing pressure at the station, he adds.
Many protesters complained that they had paid hundreds of euros for tickets to Austria or Germany.
One 20-year-old woman from Aleppo, Syria, named only as Marah, said her family had bought six tickets for a train to Vienna.
“They should find a solution,” she told Reuters. “We are thousands here, where should we go?”
The number of migrants entering Europe has reached record levels, with 107,500 arriving in July alone.
Latest figures show more than 239,000 people have arrived in Greece this year and two ferries are due to arrive near Athens on Tuesday carrying more than 4,000 migrants from Greece’s overwhelmed eastern Aegean islands.
Germany expects to take in 800,000 migrants this year – four times last year’s total.
Labour Minister Andrea Nahles said the influx meant between 240,000 and 460,000 more people could be entitled to social benefits next year, costing the state billions of euros.