Hungary's leader says the migrant crisis facing Europe is a "German problem" since Germany is where those arriving in the EU "would like to go".
PM Viktor Orban said Hungary would not allow migrants to leave its territory without registering.
His comments came as Hungarian authorities opened the main rail station in Budapest to hundreds of migrants after a two-day stand-off.
One train left, but then stopped near a migrant reception centre.
Migrants mostly from Syria but also from Iraq, Pakistan and Afghanistan resisted efforts by police to get them off the train at Bicske, about 40km (25 miles) west of Budapest. Some were banging on the windows and shouting "Germany, Germany."
EU rules place responsibility for assessing asylum claims on the country where a migrant first arrives.
Many of the migrants currently in Hungary have been refusing to register there, in order to continue their journeys to Germany before seeking asylum.
The BBC's Gavin Hewitt on board the migrant train at Bicske
Nothing illustrates how difficult this crisis is to resolve than what has happened to these several hundred refugees who are currently on this train at Bicske. They jumped on the train after waiting at Budapest station for three hours. They were really tightly crammed in - women and babies. They were told no international trains would leave. but eventually they were told this train would leave and they believed and hoped it would take them close enough to the Austrian border to get across.
There were some police on board. We got as far as Bickse and when the train pulled in, there were loads of police waiting for them on the platform. The plan seemed to be to remove them, to take them to a centre where they would be properly identified. Some people left the first carriage, but almost immediately there was resistance, a lot of people were banging on the windows, some were shouting "Germany! Germany!" The police put on riot gear.
And then there was one really distressing scene involving a woman who was carrying a baby by the railway tracks shouting "help! help!" There was a struggle involving one of her companions and riot police. This incensed some of the other refugees who had been taken off the train, they began pushing and jostling and there was a little bit of fighting with the riot police. And then they forced their way back on the train, which is where we are at the moment with police on the platform with several hundred refugees on the train in sweltering conditions.
International services from Budapest's Keleti station were suspended indefinitely. There have been days of tension at the station.
- Monday: Hungary briefly appears to abandon efforts to register migrants, allowing large numbers to board trains to Vienna and southern Germany
- Tuesday: German government reverses announcement that it would suspend the Dublin regulation, requiring migrants to seek asylum in first EU state they enter
- Tuesday and Wednesday: Hungarian police prevent migrants from boarding trains, resulting in some scuffles.
The number of migrants entering Europe has reached record levels this year. Germany expects to take in 800,000 asylum seekers this year - four times last year's total.
The surge in numbers has created tension and disagreement over EU migration policy. Germany has been prepared to accept large numbers of asylum seekers, but other countries have not.
Mr Orban, who heads the anti-immigration Fidesz party and was in Brussels for talks, said Hungarians and other Europeans were "full of fear" because "they see that the European leaders, among them the prime ministers, are not able to control the situation".
During a tense press conference with European Parliament President Martin Schulz, the Hungarian leader said that "nobody would like to stay in Hungary, neither in Slovakia nor Poland nor Estonia.
"All of them would like to go to Germany," he said. "Our job is only to register them."
Mr Schulz countered: "What we are seeing for the time being is egoism instead of common European sense.
"To say 'yeah, you know we have refugees all over in Europe but they all want to go to Germany and therefore we are not concerned' is effective, but wrong. And therefore I think we need a fair and just distribution."
European Council president Donald Tusk said on Thursday that EU countries should accept at least 100,000 asylum seekers between them, a sharp increase on a previous European Commission target of 40,000.
EU states instead so far committed to sharing some 32,000 asylum seekers from Italy and Greece.
Mr Tusk also took Mr Orban to task for comments in which the Hungarian leader said his country was being "overrun" with refugees who threatened to undermine Europe's Christian roots.
He said: "Referring to Christianity in a public debate on migration must mean in the first place the readiness to show solidarity and sacrifice."
The human cost of the crisis was also put into sharp focus on Wednesday when five children were among 12 migrants who drowned in Turkish waters while trying to reach Greece.
Images of the washed-up body of a three-year-old boy, who died alongside his mother and five-year-old brother, circulated widely on social media.
Migrants or refugees?
The word migrant is defined in the Oxford English Dictionary as "one who moves, either temporarily or permanently, from one place, area, or country of residence to another".
A refugee is, according to the 1951 Refugee Convention, any person who "owing to a well-founded fear" of persecution is outside their country of nationality and "unable" or "unwilling" to seek the protection of that country. To gain the status, one has to go through the legal process of claiming asylum.
The word migrant has traditionally been considered a neutral term, but some criticise the BBC and other media for using a word they say implies something voluntary, and should not be applied to people fleeing danger.