Thousands of exhausted refugees have arrived in the German city of Munich after boarding special trains from Austria's Vienna.
The refugees, who spent the past few days trapped in Hungary, started arriving in Munich early on Saturday morning and the trains continued to arrive throughout the day.
The refugees were being taken to an accommodation centre for registration but could be sent to shelters elsewhere in Germany in coming days.
|A refugee boy tries on a security officer's cap after arriving in Germany [Reuters]
Al Jazeera's Rob Reynolds, reporting from outside the Munich train station, said the refugees were relieved to have arrived in Germany, many with just the shirts on their backs, and had been warmly welcomed by cheering Germans.
"People here have been handing out soft toys, teddy bears for the kids, and you can see the relief on their faces that at least they have arrived safely," our correspondent said.
Austria's interior ministry arranged the transport to Germany after the refugees were bussed to the border by the Hungarian government, which gave up trying to stop them under pressure from the sheer numbers reaching its frontiers.
Report: Refugee family's baby dies on Greek island
The ministry said about 4,000 people had arrived in Austria on Saturday and the number was expected to reach 10,000 by the end of the day.
Once they reached the Austrian border, the refugees, many of them from Syria, were whisked by train and shuttle bus to Vienna, where many said they still wanted to continue on to Germany.
After days of confrontation and chaos, Hungary's government deployed the buses to take more than 1,000 refugees, including disabled people and family groups, who had set off by foot on Friday from Budapest down the main highway to Vienna.
Austria said it had agreed with Germany that it would allow the refugees access, waiving the rules of an asylum system brought to breaking point by Europe's worst refugee crisis in decades.
The UN High Commissioner for Refugees (UNHCR) praised the two countries for their "political leadership based on humanitarian values".
Wrapped in blankets and sleeping bags against the rain, long lines of weary refugees, 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".
"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.
For days, Hungary had 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 refugees refused, determined to get to the richer countries of northern and Western Europe, mainly Germany.
"The government has not commented on why they changed their mind over the issue yet," Al Jazeera's Mohammed Jamjoom, reporting from the highway leading to the Hungarian-Austrian border, said on Budapest's decision to let refugees go to Austria.
Al Jazeera's Andrew Simmons, reporting from outside Budapest, said some people were worried the police were luring them into a trap with the buses but they were so exhausted after hours of walking that they boarded them.
Traffic built up on the highway as cars crossing the border were being searched as a result of measures taken after dozens of refugees were found dead on a truck last week.
Meanwhile, European foreign ministers and officials gathered in Luxembourg on Saturday to discuss the massive influx of refugees in countries across Europe. The informal meeting finished with the countries remaining deeply divided on compulsory quotas for refugee settlement.
The European Commission will meet next week to consider an expanded scheme to relocate refugees from Hungary, Greece and Italy according to quotas.
German Chancellor Angela Merkel said on Saturday she was still aiming to balance her country's budget, despite an expected 800,000 refugees expected to arrive in Germany this year at a cost of $11bn.
|The Hungarian government deployed buses to ferry refugees to the Austrian border [AP]
Hungary has emerged as the main entry point for refugees reaching the EU by land across the Balkan Peninsula.
More than 140,000 people have been recorded entering Hungary so far this year through the EU's external border with Serbia, where Hungary's government is building a 3.5m wall.
Source: Al Jazeera And Agencies