Amid chaotic scenes, police ordered journalists from the scene at Bicske, declaring it an “operation zone”.
The train had left Budapest hours after police let migrants into the railway station following a two-day stand-off.
Meanwhile, there have been sharp disagreements among European leaders over how to deal with the crisis.
In Brussels, Hungary’s Prime Minister Viktor Orban described the situation as a “German problem” as Germany was where those arriving in the EU “would like to go”.
But European Council President Donald Tusk said at least 100,000 refugees should be distributed across EU states.
In other developments on Thursday:
- France and Germany repeated calls for a permanent and mandatory system to accept asylum seekers into the EU
- Czech police said they would stop writing numbers on migrants’ hands after criticism from human rights groups
- Turkish President Recep Tayyip Erdogan accused European nations of turning the Mediterranean into a “cemetery for refugees”
- Bayern Munich football club said it would set up a training camp for refugees coming into Germany
The human cost of the crisis was 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 three-year-old Alan Kurdi, who died alongside his mother and five-year-old brother, circulated widely on social media.