Austria and Germany threw open their borders on Saturday to thousands of exhausted migrants from the east, bussed to the frontier by a right-wing Hungarian government that had tried to stop them, but was overwhelmed by the sheer numbers of people.
Left to walk the final stretch into Austria, rain-soaked migrants - many of them refugees from Syria's civil war - were whisked by train and shuttle bus first to Vienna and then by train to Munich and other cities in Germany.
The last train carrying an estimated 1,000 refugees pulled into Munich from Austria at 1:30 a.m. on Sunday (2330 GMT), bringing the total to have arrived in the Bavarian capital since Saturday to about 8,000.
Police immediately ushered the arrivals onto another train bound for Dortmund on the opposite platform, cordoned off from onlookers in the main station terminal.
Some who wanted to stay in Munich initially refused to get on the second train, which eventually set off with all the passengers about an hour later.
Most of those who arrived on Saturday were bussed to reception centers in and around the Munich after being medically screened, fed and offered fresh clothing. Many said they were from Syria, while others were from Afghanistan or Iraq.
They seemed dazed by the calls of "welcome to Munich," from the few dozen well-wishers remaining at around midnight, as well as by their determination to thrust chocolate bars, bananas or bread rolls into their hands.
A similar total is expected to arrive in Munich later on Sunday.
Munich police said Arabic-speaking interpreters were helping refugees with procedures at the emergency registration centers. The seemingly efficient Austrian and German reception contrasted with the disorder prevalent in Hungary.
"It was just such a horrible situation in Hungary," said Omar, arriving in Vienna with his family.
German Interior Ministry spokesman Harald Neymanns said Berlin's decision to open its borders to Syrians was an exceptional case for humanitarian reasons. He said Europe's so-called Dublin rules, which require people to apply for asylum in the first EU country they enter, had not been suspended.
"The Dublin rules are still valid and we expect other European Union member states to stick to them," he said.
After days of confrontation and chaos, Hungary deployed more than 100 buses overnight to take thousands of the migrants who had streamed there from southeast Europe to the Austrian frontier. Austria said it had agreed with Germany to allow the migrants access, waiving the asylum rules.
Wrapped in blankets and sleeping bags, long lines of weary people, many carrying small, sleeping children, got off buses on the Hungarian side of the border and walked through the rain into Austria, receiving fruit and water from aid workers. Waiting Austrians held signs that read "Refugees welcome".
"We're happy. We'll go to Germany," said a Syrian man who gave his name as Mohammed; Europe's biggest and most affluent economy was the favored destination of most.
Austria said 9,000 people had crossed from Hungary on Saturday. The Austrian state railway company OeBB estimated it would have transported 7,500 migrants before stopping services for the night, with the last train from the border due to arrive in Vienna at 2100 GMT.
At the frontier with Hungary, Austrian police said the flow of people had slowed, with some still crossing on foot.
Hungary insisted the bus rides were a one-off as hundreds more people gathered in Budapest, in what has become Europe's most acute refugee crisis since the Yugoslav wars of the 1990s.
Almost emptied of migrants the night before, the main Budapest railway station was filling up again, a seemingly unrelenting human surge northwards through the Balkan peninsula from Turkey and Greece.
With trains to western Europe cancelled, hundreds set off by foot for the Austrian border, 170 km (110 miles) away, as others had tried to do on Friday. The Hungarian authorities allowed some to board trains taking them to, but not over, the Austrian border.
Hungary's hand forced
Hungary, the main entry point into Europe's borderless Schengen zone for migrants, has taken a hard line, vowing to seal its southern frontier with a new, high fence by Sept. 15.
Hungarian officials have portrayed the crisis as a defense of Europe's prosperity, identity and "Christian values" against an influx of mainly Muslim migrants.
In particular, Hungary has lashed out at Germany, which expects to receive 800,000 refugees and migrants this year, for declaring it would accept Syrians' requests regardless of where they entered the EU.
Prime Minister Viktor Orban said Hungary would deploy police and troops along its border with Serbia after Sept. 15 if parliament approved a government proposal.
"It's not 150,000 (migrants coming), that some (in the EU) want to divide according to quotas, it's not 500,000, a figure that I heard in Brussels; it's millions, then tens of millions, because the supply of immigrants is endless," he said.
For days this week, several thousand people camped outside Budapest's main railway station as trains to western Europe were cancelled, the government insisting that anyone entering Hungary must apply for asylum there as EU rules stipulated.
But the logjam broke on Friday when migrants broke out of a teeming camp on Hungary's frontier with Serbia and others escaped a stranded train. Hundreds set off for the Austrian border on foot, chanting "Germany, Germany!"
The scenes were emblematic of a crisis - about 350,000 refugees and migrants have reached the border of the European Union this year - that has left the 28-nation EU groping for solutions amid dysfunctional squabbling over burden-sharing.
A German government spokesman said Chancellor Angela Merkel and Orban had spoken by phone and agreed that the decision to open the borders was a temporary one made for humanitarian reasons.
Austrian Chancellor Werner Faymann told the newspaper Oesterreich he wanted European leaders to hold a summit on migration after an interior ministers' meeting on Sept. 14.
At an EU foreign ministers' meeting in Luxembourg on Saturday, the usual diplomatic conviviality unraveled as they failed to agree on any practical steps out of the crisis. Ministers are especially at odds over proposals for country-by-country quotas to take in asylum seekers.
"Given the challenges facing our German friends as well, all of Europe needs to wake up," Austrian Interior Minister Johanna Mikl-Leitner said. "Whoever still thinks that withdrawal from the EU or a barbed wire fence around Austria will solve the problem is wrong."
British finance minister George Osborne said Europe and Britain must offer asylum to those genuinely fleeing persecution, but must also boost aid, defeat people-smuggling gangs and tackle the Syrian conflict to ease the crisis.
Pressure to take effective action rose sharply this week after pictures flashed around the world of a drowned 3-year-old Syrian Kurdish boy washed up on the beach of a Turkish resort, personalizing the collective tragedy of the refugees.
Aylan Kurdi died with his mother and brother while trying to cross to a Greek island on a tiny rubber dinghy.
The flow of people risking rickety boats to cross the Mediterranean, or baton-wielding police on Balkan borders, shows no sign of abating.
More than 2,000 have died at sea so far this year, including 30-40 on Friday who were reported drowned off Libya's coast.
The Greek coastguard said on Saturday that about 13,370 migrants and refugees had been ferried from Greece's eastern islands to Athens since Monday.
A record 50,000 people hit Greek shores in July alone, and were ferried from islands unable to cope to the mainland by a government floundering in financial crisis and keen to dispatch them into Macedonia, whence they enter Serbia and then Hungary.