Migrants sped through the Balkans by train, bus and taxi on Monday, racing to beat a border crackdown promised by Hungary’s right-wing government.

Hungary is threatening to arrest and jail anyone caught trying to cross undetected its southern, EU border from Serbia as of Tuesday, and to hold in camps those who seek asylum in a bid to stem the flow of migrants, many of them Syrian refugees, through the Balkan peninsula.

Many appeared to be hurrying to beat the new measures, which would inevitably slow their passage through Hungary to the richer countries of northern and western Europe.

Hungarian police said a record 5,809 people had been registered entering from Serbia on Sunday and a further 5,353 just by 12 a.m. on Monday. Many appeared to be sent directly by train to the Austrian border, a Reuters photographer said.

“We heard the Hungarians will close the border on September 15th so we had to hurry from Greece,” 24-year-old engineering student Amer Abudalabi, from the Syrian capital Damascus, said shortly before crossing the border from Serbia.

“We have not slept since Saturday morning… I’m so tired. I won’t believe it when we cross into Hungary.”

Reuters reporters saw soldiers with automatic weapons standing on the Hungarian side of a metal fence that the government of Prime Minister Viktor Orban is building along the length of the border with Serbia, and which it plans to finish by October.

But there did not as yet appear to be any organized effort to halt or slow the passage of migrants. A Hungarian train left from the border town of Roszke bound for the Austrian border, each of its 16 carriages packed with over 100 migrants.

Hungary is on the frontline of Europe's worst refugee crisis since the Yugoslav wars of the 1990s, one that has sowed discord and recrimination in the 28-nation European Union.

More than a week after they lifted restrictions on the entrance of migrants from Hungary, Austria followed Germany on Monday in reimposing Europe's internal border controls, effectively suspending a two-decade old Schengen regime allowing border-free travel across the continent. Vienna said it would dispatch the armed forces to guard its eastern frontier.

"UNCOMPROMISING"

As the EU gropes for a united response, Hungary says it is duty-bound to secure the EU's external frontier. Starting Tuesday, authorities say they will receive and start processing asylum requests at the border with Serbia, and transport many of those who apply to camps elsewhere in the country.

Those who refuse to cooperate will be held at the border and possibly expelled, while those who try to smuggle themselves over the border, avoiding police, face arrest and possible imprisonment.

Many migrants try to avoid being registered or seeking asylum in Hungary, fearing being stuck in the country or sent back there if caught elsewhere in Europe.

Orban, one of Europe’s most vociferous critics of immigration, drafted hundreds more police officers to the border on Monday, telling on them to be humane but “uncompromising” in implementing the new law.

"You will meet with people who have been deceived. You will be met with temper and aggression,” he told them.

In Serbia, buses waited at a makeshift camp in the northern Serbian town of Kanjiza, from where they took migrants to around a kilometer from the border. There were visibly fewer people at the camp. Discarded blankets and shoes littered the ground.

Police say more 190,000 migrants and refugees fleeing poverty and war in the Middle East, Africa and Asia have been recorded entering Hungary from Serbia this year, many of them having crossed the water from Turkey to Greece.

Greece has taken to ferrying them from inundated islands to the mainland, from where they head north through Macedonia.

On Monday, aid workers said authorities had sped up migration procedures at the Serbian border with Macedonia and a train was taking many directly to the northern border with Hungary, bypassing Belgrade, where a central park previously inundated with migrants had emptied significantly.

Safet Ferhatbegovic, a volunteer translator in the park, said many people had left for Hungary over the weekend, some of them paying as much as 200 euros for a taxi to take them the 190 km north to the border.

"They will close the border," said 25-year-old Ahmed from the Syrian city of Aleppo as he walked with a friend across the border into Hungary. "Today is the end-day."