Thousands of migrants from the Middle East and Asia who have been stranded in Hungary arrived in Austria in the early hours of Saturday.

Between 2,500 and 3,000 people arrived in Nickelsdorf, an Austrian border town, from Hungary in the first few hours of Saturday, State Police Director Hans Peter Doskozil told the Austria Press Agency (APA), according to CNN.

Many of the migrants walked for hours on Friday before being ferried by buses deployed by Hungarian government. Hungary deployed over one hundred buses to ferry migrants to the Austrian border from Budapest, reported Reuters.

The arrival of the first thousands of refugees to Austria came after Austrian chancellor Werner Faymann and German chancellor Angela Merkel have agreed to accept the migrants.

"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," Faymann said on Friday, according to The Guardian.

The move came after a week-long stand-off between police and stranded migrants at a Budapest rail station. Hungary earlier blocked migrants' travel to Western Europe, particularly to Germany, leaving thousands of desperate migrants stranded on the streets of Budapest.  

Prime Minister Viktor Orban has said that the ongoing migrant crisis is a "German problem," not a European problem, as HNGN previously reported. He also said that Muslims refugees are not welcome in Hungary.