After days of confrontation and chaos, Hungary's right-wing government deployed dozens of buses to take migrants from Budapest and pick up over 1,000 - many of them refugees from the Syrian war - who had set off by foot on Friday down the main highway to Vienna.
Austria said it had agreed with Germany that it would allow the migrants access, waiving the rules of an asylum system brought to breaking point by Europe's worst refugee crisis since the Yugoslav wars of the 1990s.
Austrian police said on Saturday around 4,000 refugees had arrived from Hungary by bus at the border since the early morning hours, with many more to come.
"We estimate that around 4,000 have arrived - and I don't think that is the end of it," said Helmut Marban, spokesman for the police in the province of Burgenland, adding some already had continued their journey onwards.
"The numbers could well double, if not more," he told Reuters. A special half-hourly train service was now running to take people from the border to Vienna on top of 20 buses shuttling back and forth between the Austrian capital and the border with Hungary.
Wrapped in blankets and sleeping bags against the rain, long lines of weary migrants, many carrying small, sleeping children, climbed off buses on the Hungarian side of the border and walked 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. Another, who declined to be named, said: "Hungary should be fired from the European Union. Such bad treatment."
Hungary, the main entry point into Europe's borderless Schengen zone for migrants surging through the Balkan peninsula, has taken a hard line, vowing to seal its southern, external EU border within days. It has also painted the crisis as a defense of Europe's prosperity, identity and "Christian values" against an influx of mainly Muslim migrants.
For days, several thousand camped outside Budapest's main railway station, where trains to western Europe were cancelled as the government insisted all those entering Hungary be registered and their asylum applications processed in the country as per EU rules.
But on Friday, in separate, quick-fire developments, hundreds broke out of an overcrowded camp on Hungary's border with Serbia, escaped from a stranded train, and took to the highway by foot led by a one-legged Syrian refugee and chanting "Germany, Germany!"
Citing traffic safety, Hungary said it would supply some 100 buses to take them to the border.
But the move marked an admission that the government had lost control in the face of huge numbers determined to reach the wealthier nations of northern and western Europe at the end of an often perilous journey from war and poverty in the Middle East, Africa and Asia.
"Because of today's emergency situation on the Hungarian border, Austria and Germany agree in this case to a continuation of the refugees' journey into their countries," Austrian Chancellor Werner Faymann said on his Facebook page late on Friday.
The scenes were emblematic of a crisis that has left Europe groping for answers, and for unity.
Hungary has lashed out at Germany, which expects to receive 800,000 asylum seekers this year, for declaring it would accept Syrian requests regardless of where they enter the EU, contrary to the bloc's rules.
Budapest says this has fuelled the influx, and like some others in ex-Communist eastern Europe -- unused to taking in significant numbers of foreigners -- it is resisting calls by some European leaders for each of the bloc's 28 members to accept a quota of refugees. The discord continued on Saturday.
"Obviously it's in everybody's interest not to have the same situation emerging again; that's why everybody in Europe should think twice about what they say and do," Hungarian government spokesman Zoltan Kovacs said at the border.
"If this is repeated day after day, this part of Europe will be crippled," he told Reuters.
The flow of migrants risking rickety boats to cross the Mediterranean or baton-wielding police on Balkan borders shows no sign of subsiding.
A record 50,000 hit Greek shores in July alone and were ferried from inundated islands to the mainland by a government already embroiled in financial crisis and keen to whisk them north into Macedonia, from where they enter Serbia and then Hungary.
More than 140,000 migrants have been recorded crossing into Hungary so far this year via the EU's external border with Serbia. On Thursday, over 5,000 crossed into Macedonia. Countless others may have entered without registering.
Determined to stem the tide, Hungary is building a 3.5-metre (11.5-foot) high fence along its border with Serbia. On Friday, the Budapest parliament adopted measures the government says will effectively seal the frontier to migrants as of Sept. 15.
They include "transit zones" on the border, where asylum seekers would be held until their requests are processed and, if denied, they would be deported.
By nightfall on Friday, the Keleti railway terminus in Budapest, for days a makeshift migrant campsite was almost empty as smiling families boarded a huge queue of buses that snaked out of the capital. They left shoes, clothes and mattresses scattered behind them. Helicopters circled overhead.
Alerted to rumors of buses to the border, Ahmed from Afghanistan said: "If it is true, it is victory. Maybe we can find a way now."