Thousands of people desperate to reach Western Europe rushed into a Budapest train station Thursday after police ended a two-day blockade, setting off a wave of anger and confusion as hundreds shoved their way onto a waiting train. But when it tried to drop them off at a Hungarian camp for asylum seekers, a bitter showdown began.

One man threw his wife and infant son onto the tracks, screaming in Arabic, "We won't move from here!" Police surrounded the prone family, pulled the husband away and handcuffed him as he wailed. His wife and diaper-clad boy — apparently uninjured despite their stumbling descent onto the tracks — were freed and allowed to rejoin other migrants.

The scene of desperation was just one of many that unfolded Thursday as tempers flared in Hungary's war of wills with migrants trying to evade asylum checks and reach Western Europe, a showdown with consequences for the entire continent.

As Hungary's anti-immigrant prime minister warned European partners that he intends to make his country's borders an impassible fortress for new arrivals, his government struggled to coax thousands of unwanted visitors away from the Budapest transportation hub that has been turned into a squalid refugee camp.

People fleeing war and poverty in the Middle East, Asia and Africa rushed into the Keleti train terminal when police unexpectedly withdrew Thursday morning, ending a blockade designed to stop migrants from boarding trains to their desired destinations in Germany and Austria.

Hungary Migrants

Migrants look out the window of a train at Bicske station in Hungary on Thursday. (Zoltan Balogh/MTI via AP)

In desperate scenes, people pushed each other to reach the train's six carriages. Children caught in the melee cried in terror as parents or older siblings pulled them through open windows, thinking that getting on board meant they would be first to escape Hungary.

Food and water tossed

But instead of heading to the Austrian border, the overloaded train stopped at Bicske, a town northwest of Budapest that holds one of the country's five camps for asylum seekers — facilities the migrants want to avoid because they don't want to pursue asylum claims in economically depressed Hungary. As the train platform filled with police came into view, those inside chanted their disapproval and their determination to reach Germany, their almost unanimous goal.

The crowd, angrily waving train tickets to Vienna and Munich, refused police orders to board buses to the asylum centre, pushing their way past police and back onto the train. A day-long standoff ensued in which police and charity workers took turns handing food and water to the passengers, only to have them tossed out train windows in protest.

"We don't need food and water! Just let us go to Germany!" one man shouted. Children held up handwritten signs reading, "Let's Go Germany."

About 100 police kept watch on the train, barring media from the platform, but didn't remove the migrants by force.

Hungary Migrants

Migrants receive a juice donation in front of the railway station in Budapest on Thursday. (Frank Augstein/Associated Press)

The head of police border control, Col. Laszlo Balazs, said 16 people voluntarily checked into the asylum centre, while about 500 others refused. He said officers were using loudspeakers to inform those who wouldn't comply of "their legal obligations."

"Nobody can avoid identity checks. Everyone must submit themselves to this measure, and the police are keeping this train in place until they do," he said.

Back at the Budapest train station, announcements in Hungarian and English — but not Arabic, the language of most of those gathered inside — declared that all services from the station to Western Europe had been cancelled. A statement in English on the main departures board said no more trains to Austria or Germany would leave "due to safety reasons until further notice!"

Rail company refuses to refund tickets

Conditions at Keleti station have grown increasingly unsanitary despite the efforts of volunteers distributing water, food, medicine and disinfectants. The numbers of those stuck there have swelled since Hungary reversed course Tuesday after allowing more than 2,000 migrants to travel on trains heading west the day before. Thousands were stranded after buying tickets costing 61 to 122 euros ($89 to $179 Cdn).

Hungary's rail company said Thursday it was refusing to refund the tickets at the station, citing fears that some may be counterfeit. It said ticket-holders must file refund requests in writing and have the reimbursement mailed to them.

The waiting is taking its toll and has sparked occasional protests near the terminal entrance. The migrants survive on food handouts from Hungarian charities and individual donors, augmented by their own purchases from pizza stalls, kebab shops and burger joints. Sleeping overnight on the cold concrete proves fitful, leaving many semi-comatose in a carpet of bodies by day.

Amid the human sprawl, children played and scavenged. One baby boy crawled away from his sleeping parents to eat breadcrumbs scattered on the pavement. Nearby, an unattended toddler walked to a pile of garbage and picked at discarded candy wrappers in search of a treat.