The incident took place on Thursday after the train stopped at Bicske near one of Hungary's four main camps. Several hundred other refugees, who had likewise boarded the train in Budapest's Keleti station in hopes of heading for western destinations, protested by refusing to come off.
Many angrily protested, shouting "Germany! Germany!" and holding placards saying "Help" and "SOS."
Earlier in the day, more than 1,000 stormed into the station when police opened it to refugees after two days. The decision came after several thousand boarded trains to Austria and Germany on Monday.