Warsaw (AFP) - Over half a million migrants have crossed the European Union's border so far this year, up from 280,000 in 2014, the bloc's Frontex border agency said Tuesday -- but warned some people may have been counted twice.

"More than 500,000 migrants were detected at EU borders in the first eight months of this year after a fifth consecutive monthly record was registered in August when 156,000 crossed the EU borders," a Frontex statement said.

"However, a large number of the persons detected at the Hungarian border with Serbia had already been counted when they arrived in Greece from Turkey a few weeks earlier," it added, suggesting the number of entries could be lower.

The Greek islands experienced the greatest "number of detections in August at 88,000, an 11-fold rise compared to the same month last year."

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.

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.

ROSZKE, Hungary (AP) — Declaring a state of emergency, Hungary sealed off its southern border with Serbia on Tuesday and detained those trying to enter illegally, aiming to shut down the flow of migrants pouring in. Chaos ensued at the border, as hundreds of migrants piled up in a no man's land, and Serbian officials reacted with outrage.

Stuck for an unknown amount of time on a strip of road between the two countries' checkpoints, those fleeing violence in their homelands pitched tents and settled in. But frustrations were on the rise. As a police helicopter hovered above, migrants chanted "Open the border!" and shouted insults at Hungarian riot police. Some refused food and water in protest.

With a razor-wire fence completed along the Serbian border, Foreign Minister Peter Szijjarto said Hungary now also plans to extend the fence for "a reasonable distance" along its border with Romania.

ROSZKE, Hungary (AP) — Hungary has deployed a boxcar bristling with razor wire to close a key border crossing and warned of deportations as part of a new effort to deal with a massive influx of migrants from countries in the Middle East, Asia and Africa.

New laws that went into effect Tuesday also made it a criminal offense, punishable by prison or deportation, to damage Hungary's newly erected border defenses.

Hungarian officials have also ordered low-altitude airspace on the border reserved for police surveillance helicopters, while officers on horseback patrolled parts of the nearly 110-mile (175-kilometer) border.