The international rail station in the Hungarian capital, Budapest, opened its doors to the thousands of refugees camped outside Thursday, following a tense two-day standoff that saw Hungarian authorities preventing them from entering the station.
Hundreds of people, many fleeing conflict in Syria and Afghanistan, rushed to cram onto the trains in Keleti station, with many believing they were heading to Austria and Germany.
However, confusion and chaos reigned as Hungarian authorities cancelled all departures to western Europe, Reuters reported.
Reporters at the station spoke of the lack of information being provided by authorities as to the destination of the trains.
Most people had been hoping to continue their journey to countries such as Germany that have pledged to take larger numbers of asylum-seekers and refugees than many of their European counterparts.
As trains to Vienna and Germany were cancelled, the trains were initially rerouted to the town of Sopron, close to the Austrian border, according to Reuters.
This video shows dozens of people desperately trying to board a train carriage at Keleti station:
Tensions began to rise when trains were stopped 30 kilometers (19 miles) away in the town of Bicske, with riot police ordering them off their carriages, ITV News reported.
The arrival in Bicske prompted fears among passengers that they were going to be moved to a refugee camp within Hungary, the BBC reported.
Desks and tents had been set up outside the station, according to CNN.
Dozens of migrants began chanting "no camp, no camp" at police at the station, the BBC said.
ITV News' Europe editor, James Mates, was aboard one of the trains and tweeted the arrival in the town.
One family with a young baby threw themselves on the tracks in protest, demanding not to be taken to camps.
Others simply refused to leave their trains, prompting a lengthy stalemate between the migrants and refugees and Hungarian police.
Journalists at Bicske said that police had started to usher media away from the station.
Later, a number of the refugees were taken from the train to a bus, ITV News reported.
Speaking at a tense news conference alongside European Parliament President Martin Schulz in Brussels, Hungary's nationalist Prime Minister Viktor Orban said the issue of asylum-seekers and refugees in Europe was "a German problem."
"Nobody would like to stay in Hungary, neither in Slovakia nor Poland nor Estonia," Orban said. "All of them would like to go to Germany. Our job is only to register them."
He added: "Hungarians are full of fear. People of Europe are full of fear because they see that the European leaders, among them the prime ministers, are not able to control the situation."
Non-EU asylum-seekers and refugees entering the union's territory are required to register with the country they first land in.
On Thursday Orban also claimed he was defending Europe's Christian identity from an influx of Muslims, according to The Guardian:
"Those arriving have been raised in another religion, and represent a radically different culture. Most of them are not Christians, but Muslims," he said. "This is an important question, because Europe and European identity is rooted in Christianity. Is it not worrying in itself that European Christianity is now barely able to keep Europe Christian? There is no alternative, and we have no option but to defend our borders."
Elsewhere in Hungary Thursday, members of the far-right Jobbik party and other extreme right groups gathered at the border to protest the arrival of refugees:
Francis Whittaker is a homepage editor for BuzzFeed News and is based in London.
Contact Francis Whittaker at firstname.lastname@example.org.
Got a confidential tip? Submit it here.