The number of migrants entering Hungary from Serbia hit a new record on Saturday amid tension in eastern Europe over how to deal with the crisis.
More than 4,000 people walked across the border with Serbia just as the authorities in Hungary were completing preparations to seal the frontier.
Europe is struggling to cope with an enormous influx of people, mostly from Syria, fleeing violence and poverty.
Hungarian Prime Minister Viktor Orban has promised to seal the country's borders and arrest any illegal migrants.
The country is close to finishing a 4m-high fence along the border with Serbia.