Hundreds of migrants have been in a stand-off with police outside Budapest's main rail station as new figures highlighted the unprecedented scale of the European Union's refugee crisis.
More than more than 350,000 people, many from war-torn Syria, have made the perilous crossing of the Mediterranean so far this year, the International Organisation for Migration (IOM) says.
Police, some in riot gear, cleared and briefly shut Keleti station a day after thousands of migrants boarded trains for Germany and Austria.
As night fell more than 300 migrants were still being barred from the station by police, and rights group Hungarian Helsinki Committee warned the situation was "very tense and unpredictable".
The blocked migrants chanted "Germany! Germany! We want to leave!" in protest, and some held their babies in the air in a sign of their distress.
Hungarian railway authorities said they would allow "only those in possession of the appropriate travel documents and - if necessary - a visa" to board trains travelling to western Europe.
The ban was enforced just 24 hours after police had unexpectedly allowed people stuck for days in makeshift camps to leave Budapest, with hundreds surging onto trains bound for Germany and Austria, despite many not having EU visas.
This saw the highest number of migrants entering Austria in a single day this year, with police saying 3650 arrived in Vienna by train on Monday.
Many continued on to Germany, which last week eased asylum restrictions for Syrian refugees.
German police said a record 3500 asylum-seekers had turned up in Bavaria on Tuesday.
The latest flashpoint came as the IOM published new figures revealing the scale of Europe's biggest migrant crisis since World War II.
Out of the 350,000 arrivals by sea so far this year, 234,770 alone were in Greece, it said.
That figure by itself is more than the entire Europe-wide total for all of 2014.
At least 2600 died trying to reach Europe, either by drowning or suffocating in packed or unseaworthy boats, the agency said.
Stories of refugees dying in horrific conditions crammed inside lorries have piled the pressure on the EU, which has scheduled emergency talks for September 14.
Within the EU, the crisis has stoked friction over burden-sharing - about help for "frontline" nations where the migrants arrive by sea or land, and about sharing out the numbers who are granted asylum.
Much-flouted EU rules, known as the Dublin regulation, say refugees should be processed in the first country they reach.
But Hungary, where 50,000 migrants arrived in August, insists it cannot cope and has built a razor-wire fence along its border with Serbia.
France has slammed the fence as "scandalous" while Austria has accused Hungary of being "sloppy" in applying the Dublin rules.
The migrants' plight was brought sharply into focus last week after 71 people, including four children, were found dead in an abandoned truck on an Austrian motorway near the Hungarian border.
So far, police in Hungary and Bulgaria have arrested six people in connection with the tragedy.
The grim discovery led to a security crackdown in Austria with huge tailbacks forming along the border on Monday and Tuesday (local time), as officers inspected vehicles in search of people-smugglers and migrants.
The EU's Frontex border agency meanwhile said a brisk trade in fake Syrian passports had emerged, mostly in Turkey.