Before dawn, they clambered off a fleet of Hungarian buses at the Austrian border to find a warm welcome from charity workers offering beds and hot tea. Within a few more hours of rapid-fire aid, many found themselves whisked by train to the Austrian capital, Vienna, and the southern German city of Munich.

The surprise overnight effort eased immediate pressure on Hungary, which has struggled to manage the flow of thousands of migrants arriving daily from non-EU member Serbia. But officials warned that the human tide south of Hungary still was rising, and more westward-bound travelers arrived in Budapest within hours of the mass evacuation of the capital's central rail station.

The apparent futility of stopping the migrants' progress west was underscored when Hungary announced Saturday that its bus service to the border had finished and would not be repeated. Almost immediately two groups of migrants hit the pavement to start walking to the border: about 200 who walked out of an open-door refugee camp near the city of Gyor, and about 300 who left Budapest's central Keleti train station, the epicenter of Hungary's recent migrant crisis.

About 4,000 migrants crossed into Austria from Hungary by mid-morning, according to Austrian police spokesman Helmut Marban. Vienna city official Roman Hahslinger said 2,300 had arrived in Vienna by midday. And officials in both Austria and Germany said the unregulated flow of migrants Saturday from Hungary meant that up to 10,000 might cross by nightfall.

Hungary's nationalist government had spent most of the week trying to force migrants to report to government-run refugee centers, but thousands refused and demanded free passage chiefly to Germany.

After a three-day standoff with police, thousands marched west Friday from the Keleti train station along Hungary's major motorway and camped overnight in the rain by the roadside. Hundreds more broke through police lines at a train station in the western town of Bicske, where police were trying to take them to a refugee camp, and blocked the main rail line as they, too, marched west.

Austria and Germany made the breakthrough possible by announcing they would take responsibility for the mass of humanity that was already on the move west or camped out in their thousands at Keleti. Hungary on Tuesday had suspended train services from that station to Austria and Germany, compounding the build-up there in a futile bid to try to make the visitors file asylum papers in Hungary.

Austrian Federal Railways said the arrivals, once they passed through hastily assembled border shelters and enjoyed refreshments, were being placed on trains to both Vienna and the western city of Salzburg and, for those who requested it, links onward to German cities.

"After endless examples of shameful treatment by governments of refugees and migrants in Europe, it is a relief to finally see a sliver of humanity. But this is far from over, both in Hungary and in Europe as a whole," said Gauri van Gulik, Amnesty's deputy director for Europe. "The pragmatic and humane approach finally applied here should become the rule, not the exception."

When the first 400 migrants and refugees arrived in Vienna, charity workers offered a wide choice of supplies displayed in separately labeled shopping carts containing food, water and packages of hygiene products for men and women. A mixed crowd of friends and Austrian onlookers cheered their arrival, with many shouting "Welcome!" in both German and Arabic. One Austrian woman pulled from her handbag a pair of children's rubber rain boots and handed them to a Middle Eastern woman carrying a small boy.

"Austria is very good," said Merhan Harshiri, a 23-year-old Iraqi who smiled broadly as he walked toward the supply line, where newcomers munched on fresh fruit. "We have been treated very well by Austrian police."

"I am very happy," said Firas Al Tahan, 38, a laundry worker from the Syrian capital, Damascus. Seated beside him on the train station's concrete pavement were his 33-year-old wife, Baneaa, in her lap 1-month-old daughter Dahab, and beside them four other children aged 5 to 12, all smiling beside a cart containing green and red apples.

Earlier in jubilant scenes on the border, about 100 busloads of migrants and refugees disembarked on the Hungarian side of the border and walked a short distance into Austria, where volunteers at a roadside Red Cross shelter welcomed them with tea and handshakes. Many of the travelers slumped in exhaustion on the floor, evident relief etched on their faces.

Many had been awoken by friends at Keleti around midnight with news many didn't believe after days of deadlock: Hungary was granting their demand to be allowed to reach Austria and, for many, onward travel to Germany. Many feared that the scores of buses assembling at the terminal instead would take them to Hungarian camps for asylum-seekers, as the government previously insisted must happen. At times, it took extended negotiation at the bus doors to persuade people to climb aboard.

Keleti appeared transformed Saturday as cleaners used power washers to clear what had become a squalid urban refugee camp of approximately 3,000 residents sprawled about every courtyard and tunnel leading to Budapest's subway system. Only about 10 police remained to supervise a much-thinned presence of approximately 500 campers sleeping in pup tents or on blankets and carpets.

Keleti's transient population dwindled further in the afternoon as about 300 headed west through the city on foot. One marcher displayed a handwritten cardboard banner reading "Walking on foot to Austria." Unlike Friday, when police tried to block marchers initially, officers this time offered practical assistance in controlling traffic and providing directions to the marchers. They quickly crossed a major bridge spanning the Danube River as police in two vans and on two motorcycles stopped traffic to ease the trekkers' safe passage.

Many travelers have spent months in Turkish refugee camps, taken long and risky journeys by boat, train and foot through Greece and the Balkans, and crawled under barbed wire on Hungary's southern frontier to a generally frosty welcome in this country with strong anti-immigrant sentiments.

Since Tuesday morning, Hungarian authorities had refused to let them board trains to the west, and the migrants balked at going to processing centers, fearing they would face deportation or indefinite detention in Hungary. Government officials said they changed course because Hungary's systems were becoming overwhelmed by the sheer numbers.

In Berlin, German officials said they felt it was necessary to take responsibility given Hungary's apparent inability to manage the challenge. But they emphasized that Hungary, as an EU member and first port of call for many migrants, needed to do more to ensure that new arrivals filed for asylum there rather than travel deeper into Europe.

"Because of the emergency situation on the Hungarian border, Austria and Germany have agreed to allow the refugees to travel onward in this case," German government spokesman Georg Streiter told The Associated Press. "It's an attempt to help solve an emergency situation. But we continue to expect Hungary to meet its European obligations."

German Chancellor Angela Merkel, who has led calls for other EU members to shelter migrants as potential refugees, particularly those fleeing civil war in Syria, said in comments published Saturday that her country would observe no legal limit on the number of asylum seekers it might take.

Merkel told the Funke consortium of newspapers that "the right to political asylum has no limits on the number of asylum seekers."

"As a strong, economically healthy country we have the strength to do what is necessary" and ensure that every asylum seeker gets a fair hearing, she was quoted as saying.