Hungary is to send a fleet of buses to the main Keleti train station in Budapest and to the M1 highway heading to Vienna after hundreds of migrants decided to stop waiting for permission to get on trains and set off for Austria on foot.
In striking scenes, over 1,200 migrants walked all day and into the night along the highway, sometimes disrupting traffic with their vast numbers.
At a train station in the northern town of Bicske, several hundred other migrants refused police demands to go to a camp, broke through a police cordon and took off for the Austrian border.
Janos Lazar, chief of staff for Prime Minister Viktor Orban, said "this is an opportunity. The immigrants have to decide whether they want to take advantage of it. We are taking this step so Hungary's transportation is not paralysed during the next 24 hours".
He said the buses will take the migrants to the main Hegyeshalom crossing with Austria. It is not clear, however, if the migrants will trust authorities and get on the buses. They were tricked earlier this week to get on a train that did not go to Austria.
Also there is no answer yet from Austria on whether they will let the migrants in.
The asylum-seekers - many from Syria, Iraq and Afghanistan - had already made dangerous treks in scorching heat on Hungary's southern frontier and faced the hostility of some locals along the way. Their first stop will be Austria, on Hungary's western border, though most hope to eventually reach Germany.
Hungarian authorities had refused to let them board trains to the west, and they balked at going to processing centres for migrants, fearing they would then be forced to live in Hungary.
Under European law, refugees are supposed to seek asylum in the first European Union country that they enter. But most of them see limited economic opportunities and a less welcoming atmosphere in Hungary than in Germany, Sweden and other western nations.
Earlier Parliament tightened its immigration rules, approving the creation of transit zones on the border with Serbia where migrants would be kept until asylum requests were decided within eight days. Migrants would have limited chance to appeal those decisions.
In what the Hungarian media called a "day of uprisings," about 350 people broke through a police cordon in Bicske and began heading to Austria 85 miles to the west on tracks leading away from the railway station. Surprised riot police scrambled for their helmets as the huge crowd suddenly surged from the front of the train.
One man, a 51-year-old Pakistani, collapsed about 800 metres from the station as he fled and died despite efforts to help him.
Those left behind, mostly women and children, were boarded on to buses and taken to the nearby asylum centre.
Hours earlier, about 2,000 people set out from Budapest's Keleti station for a 106-mile journey toward Austria. Police tried to block them at first but quickly gave up. The marchers moved fast, and by nightfall they had already covered about 30 miles.
Along the way, there were gestures of support from Hungarians. Many flashed them the V-for-victory sign and some handed out bottles of water. A small number of locals made clear the new arrivals were not welcome.
"Go home already!" a man shouted in Hungarian from a passing car.
Osama Morzar, 23, from Aleppo, Syria, was so determined not to be registered in Hungary that he used acid on his fingertips, holding his hand up for a reporter to see.
"The government of Hungary is very bad," said Mr Morzar, who studied pharmacology at Aleppo's university. "The United Nations should help."
A couple from Baghdad, Mohammed and Zahara, who marched with a toddler, said they had been in a Hungarian asylum camp and got roughed up by guards because they refused to be fingerprinted. She said she has family in Belgium and is determined to seek asylum there.
Austrian police were preparing main border points with reception areas and first-aid facilities. Hans Peter Doskozil, police chief in easternmost Burgeland province, said the measures should be sufficient for the initial influx.
Saleh Abdurahman, a Palestinian refugee from Syria who marched from Budapest, said he was set on escaping a Middle East made intolerable by wars that he blames on the United States and Europe.
The International Organisation for Migration said more than 364,000 migrants have arrived in Europe this year - and over 2,800 have died along the way, most in the sea crossing from North Africa.
Greece and Italy have seen more than 245,000 and nearly 117,000 arrive respectively, most by sea.
In Kobani, Syria, three-year-old Aylan Kurdi was buried today, along with his mother and five-year-old brother. They were among 12 migrants who drowned off the Turkish coast of Bodrum on Wednesday, and a photo of Aylan's body in the surf has captured the world's attention as a symbol of the migration crisis.
The grieving father, Abdullah Kurdi, survived the tragedy. He said he was abandoning thought of leaving his homeland again.
"He only wanted to go to Europe for the sake of his children," said Suleiman Kurdi, an uncle of the father. "Now that they're dead, he wants to stay here in Kobani next to them."
Turkey's state-run Anadolu news agency said four suspected human traffickers were detained in connection with the drownings and face charges of smuggling and involuntary manslaughter. The four, including a Syrian national, were being questioned by a court in the Turkish resort town of Bodrum, it reported.