By Krisztina Than and Francois Murphy

ROSZKE, Hungary/VIENNA (Reuters) - Two decades of frontier-free travel across Europe unraveled on Monday as countries re-established border controls in the face of an unprecedented influx of migrants, which broke the record for the most arrivals by land in a single day.

Germany's surprise decision to restore border controls on Sunday had a swift domino effect, prompting neighbors to impose checks at their own frontiers as thousands of refugees pressed north and west across the continent while Hungary sealed the main informal border crossing point into the European Union.

A majority of EU interior ministers, meeting in Brussels, agreed in principle to share out 120,000 asylum seekers on top of some 40,000 distributed on a voluntary basis so far, EU president Luxembourg said. But details of the deal, to be formalized on Oct. 8, were vague with several ex-Communist central European states still rejecting mandatory quotas.

Austria said it would dispatch its military to help police carry out checks at the border with Hungary after thousands of migrants crossed on foot overnight, filling up emergency accommodation nearby, including tents at the frontier.

Thousands more raced across the Balkans to enter Hungary before new rules take effect on Tuesday, which Budapest's right-wing government says will bring a halt to the illegal flow of migrants across its territory.

By 1400 GMT on Monday, police said 7,437 migrants had been recorded entering Hungary from Serbia, beating the previous day's record of 5,809.

Then helmeted Hungarian police, some on horseback, closed off the main informal crossing point, backed by soldiers as a helicopter circled overhead. A goods wagon covered with razor wire was moved into place to block a railway track used by migrants to enter the EU's Schengen zone of border-free travel.

Hungary later declared the low-level airspace over its border fence closed but allowed a trickle of refugees to enter the country at an official crossing point.

Story continues

As the shockwaves rippled across Europe, Slovakia said it would impose controls on its borders with Hungary and Austria. The Netherlands announced it would make spot checks at its borders. Other EU states from Sweden to Poland said they were monitoring the situation to decide whether controls were needed.

"If Germany carries out border controls, Austria must put strengthened border controls in place," Vice Chancellor Reinhold Mitterlehner told a joint news conference with Chancellor Werner Faymann. "We are doing that now."

The army would be deployed in a supporting role.

BIGGEST THREAT TO SCHENGEN

Monday's measures were the biggest threat so far to the Schengen system of a border-free Europe, which ranks alongside the euro single currency as one of the transformative achievements of integration on the continent.

Named after a Luxembourg town where it was agreed, Schengen has eliminated frontier posts across the continent since 1995. Twenty-six European countries now issue common visas and leave the borders between them unguarded.

Frontiers which were fought over for centuries and which were a bottleneck for traffic and trade just a few years ago are now marked by little more than signposts on highways across the world's biggest economic bloc.

The rules bar undocumented migrants from travel within the zone but leave few mechanisms to stop them.

That has created chaos as hundreds of thousands of people, including refugees from war in the Middle East, arrive on the bloc's southern and eastern edges and trek to rich countries further north and west.

EU interior ministers held seven hours of crisis talks, with Germany, France and the bloc's executive Commission trying to overcome opposition from eastern members to a plan to compulsorily relocate 160,000 refugees from Italy, Hungary and Greece.

They did agree on the need for tighter controls of the bloc's external borders, more aid to the U.N. refugee agency for camps close to Syria's borders, and rapid screening of arrivals and deportation of those without valid asylum claims, to appease countries concerned that relocations will attract more people.

The EU ministers agreed to finalize soon a list of "safe countries" whose citizens would not normally be entitled to asylum. But in a snub to Ankara, the EU presidency said Turkey would not be classified as "safe" for now due to its current military action against Kurdish militants.

TRAINS TO AUSTRIAN BORDER

Hungary's hardline right-wing government had warned that new policies due to take effect on Tuesday would halt the flow across its frontier, the main land route the EU. That led to an unprecedented rush to cross before the deadline.

Soldiers cradled automatic weapons by a metal fence that the government of Prime Minister Viktor Orban says will run the length of the frontier with Serbia by October.

"We heard the Hungarians will close the border on September 15 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."

From Tuesday, Hungarian 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 cross evading police will face arrest.

Orban said once the new rules were in force, he expected a high rate of deportations from Hungary.

"In such a case, if someone is a refugee, we will ask them whether they have submitted an asylum request in Serbia," he was quoted as telling private broadcaster TV2. "If they had not done so, given that Serbia is a safe country, they will be rejected."

The right-wing premier, one of the loudest critics of immigration he calls a threat to Europe's Christian heritage, drafted hundreds more police officers to the border on Monday, telling them to be humane but "uncompromising".

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

In Serbia, buses took migrants from a makeshift camp in the northern town of Kanjiza to around a kilometer from the border. Discarded blankets and shoes littered the area.

In the south, on the border with Macedonia, aid workers said authorities had sped up migration procedures and a train was taking many directly to the Hungarian border, bypassing Belgrade, where a park previously inundated with migrants was rapidly emptying as they headed for the border.

EMERGENCIES

Schengen countries are permitted to reimpose border checks on a temporary basis in emergencies, and have occasionally done so in the past on security grounds during major sports tournaments or international summits, but not on this scale.

Most refugees have been bound for Germany, which announced in August it would suspend EU asylum policy to accept Syrians who arrive elsewhere in the EU, luring more to trek across the bloc.

Austria had shuttled refugees directly on to Germany. But since Berlin announced border controls on Sunday, migrants have walked across the border into Austria from Hungary at the fastest rate yet, without being able to travel onward. An Austrian police spokesman said in the early afternoon that 9,000 people had arrived since midnight, after 14,000 on Sunday.

The threat to reimpose border controls has spread beyond southern and eastern countries along the main migration paths. The Dutch justice ministry said it would impose "mobile controls" in border regions. The Netherlands received 3,000 asylum seekers last week, double the number from a week before.

German Chancellor Angela Merkel has taken a lead, announcing that Europe's biggest economy was willing to host hundreds of thousands of refugees and preparing for as many 800,000 asylum requests this year. Her vice chancellor said in a letter to party members seen by Reuters that figure could reach 1 million.

(Reporting by Reuters bureaux in Brussels, Warsaw, Belgrade, Berlin, Vienna and Amsterdam; Writing by Peter Graff; Editing by Paul Taylor and Alastair Macdonald)