Migrants trickled across Hungary's border into Austria on Saturday, swept west on buses by an overwhelmed government that had vowed to stem their tide but gave up in the face of defiant crowds that set out on foot for western Europe.
A Reuters photographer saw dozens of migrants, among them refugees from the Syrian war, walk into Austria, which said it had agreed with Germany to grant them access, regardless of European Union rules.
The Keleti railway terminus in the Hungarian capital, for days a campsite of migrants barred from taking trains west to Austria and Germany, rapidly emptied as smiling families boarded a huge queue of buses, leaving behind them scattered shoes, clothes and mattresses.
After days of confrontation and chaos, Hungary's right-wing government said it would provide transport for migrants in Budapest and another 1,200 striding down the main highway to Vienna, led by a one-legged Syrian refugee and chanting "Germany, Germany!"
Hungary cited traffic safety for the decision. But it appeared to mark an admission that the government had lost control in the face of overwhelming numbers determined to reach western Europe having fled 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.
Hundreds broke out of an overcrowded camp on Hungary's border with Serbia on Friday; others escaped a stranded train, sprinting away from riot police down railway tracks, while more still took to the highway by foot in scenes emblematic of a crisis that has left Europe groping for answers, and for unity.
"They told us that the buses are going to the Austria border," said Ahmed, from Afghanistan. "I really don't know if this is true or false. If it is true, it is great... If it is true, it is victory. Maybe we can find a way now."
Austria's Red Cross said it expected between 800 to 1,500 people to arrive in its refugee reception centre of Nickelsdorf at the Hungarian border overnight.
For days, Hungary has cancelled all trains going west to Austria and Germany, saying it is obliged under EU rules to register all asylum seekers, who should remain there until their requests are processed.
Many have refused, determined to get to the richer and more generous countries of northern and western Europe, mainly Germany.
Several thousand have been camped outside the Budapest train station, but on Friday a crowd that swelled to over 1,000 broke away, streaming through the capital, over a bridge and out onto the main highway from Budapest to Vienna, escorted by police struggling to keep the road open.
Clutching pictures of German Chancellor Angela Merkel, they broke through a police barricade.
The turmoil contrasted with a pledge by Hungarian Prime Minister Viktor Orban to get to grips with Europe's worst refugee crisis since the Yugoslav wars of the 1990s; parliament tightened laws that his government said would effectively seal Hungary's southern border to migrants as of Sept. 15.
Orban, one of Europe's most outspoken critics of mass immigration, hailed "a different era", but Friday brought more desperate scenes. A Pakistani man died, police said. State television said he had stumbled and hit his head as he ran down train tracks.
The Hungarian's government hard line appeared to be breaking down in the face of such large numbers headed for Germany, which had said Syrian refugees could register there regardless of where they enter the EU, contrary to EU rules.
More than 140,000 migrants have been recorded entering Hungary so far this year through the EU's external border with Serbia, where Orban's government is building a 3.5-metre (11.5-foot) high wall. Countless others may have entered without registering.
On Friday, lawmakers adopted some of a raft of measures creating "transit zones" on the border, where asylum seekers would be held until their requests are processed and deported if denied.
The measures introduce jail terms for those who cross the border without permission or damage the fence, and may eventually provide for the use of the army.