Austria's interior minister says that no one fleeing regions of war or persecution will be turned back to Hungary despite the introduction of controls at borders separating the two countries.

Johanna Mikl-Leitner's comments Tuesday came shortly before Austria imposed temporary controls at its border points with Hungary, starting immediately after midnight.

Mikl-Leitner told state broadcaster ORF that Syrians and others in danger in their home countries can continue to ask for asylum in Austria. She says they will also be free to travel on to Germany, as was the case up to now.

Her comments shed light on previous uncertainty over whether such migrants would be allowed to continue their journey. The ministry earlier said only that all travellers must carry a passport or EU-recognized identity document.

Austrian police welcome refugees as they arrive at Heiligenkreuz, Austria, late Tuesday. (The Associated Press)

It also said the controls could be extended to the country's borders with Slovenia, Italy and Slovakia, if needed. That reflects the possibility that people now streaming into Austria from Hungary could instead try to cross into Austria over those borders in large numbers.

Hungary seals border with Serbia

Hungary declared a state of emergency on Tuesday and sealed off its southern border with Serbia, detaining those trying to enter illegally and 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.

Migrants look through the border fence between Serbia and Hungary, near Horgos, Serbia, Tuesday. (Zoltan Mathe/MTI/Associated Press)

In Berlin, German Chancellor Angela Merkel called for a special EU refugee summit, urging unity after an angry reaction to a suggestion by one of her ministers that states that didn't take in their share of asylum seekers could face financial penalties.

The proposal by Interior Minister Thomas de Maiziere was forcefully rejected by the Czech Republic and Slovakia, which are among eastern European states that have resisted European Union plans to share out refugees.

Merkel later took a more conciliatory tone, calling for Europe to come together on the refugee issue.

"I think we need to establish a European spirit again … I don't think threats are the right way to achieve agreement," she told a news conference with Austrian Chancellor Werner Faymann, whose country is also in the front line of the refugee crisis.

In addition to the possible summit, the European Union will hold an extra meeting of justice and interior ministers next week to figure out how to relocate 120,000 refugees among its members.

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

Both Serbian and Romanian governments decried Hungary's moves.

"Raising a fence between two EU member states who are strategic partners is not a fair gesture from a political point of view, according to the European spirit," Romania's Foreign Ministry said.

Serbia's foreign minister declared it was "unacceptable" that migrants were being sent back from Hungary while more and more were arriving from Macedonia and Greece.

"(Serbia) wants to be part of the solution, not collateral damage. There will have to be talks in the coming days with Brussels and other countries," Ivica Dacic said in Prague.

Migrants wait in Horgos, Serbia, on the border with Hungary early Tuesday. Hungary has sealed the last gap in the barricade along its border with Serbia, closing the passage to thousands of waiting refugees and migrants. (Balazs Mohai/EPA)

The turmoil at the Hungarian-Serbian border came a day after the 28-nation bloc failed to come up with a united immigration policy at a contentious meeting in Brussels. The ministers did agree to share responsibility for 40,000 people seeking refuge in overwhelmed Italy and Greece and spoke hopefully of reaching an eventual deal — next month or by the end of the year — on which EU nations would take 120,000 more refugees, including some from Hungary.

Hungary was not pinning its hopes on any action soon from Brussels or its neighbours. Tuesday's state of emergency in two southern regions gave authorities greater powers to deal with the crisis, allowing them to shut down roads and speed up asylum court cases.

In the last few months, Hungary has become a major bottleneck and entry point into the European Union for migrants, many of them war refugees from Syria and elsewhere in the Middle East. Prime Minister Viktor Orban, however, has insisted that most arriving are economic migrants seeking a better life, not war refugees entitled to protection — a view sharply at odds with other EU nations, including Germany.

The new laws in Hungary now make it a crime to cross or damage a four-metre razor-wire fence the government has built along the southern border with Serbia and also includes longer prison terms for convicted human traffickers.

"Due to the situation caused by mass migration, the Hungarian government declares a state of crisis," government spokesman Zoltan Kovacs told reporters in the southern city of Szeged. "We are very clear on this: Illegal border crossing is a crime."

Technically, parliament must still approve the deployment of the military, expected next week, but Associated Press reporters at the border have seen heavily armed military personnel with vehicles and dogs for days.

Gyorgy Bakondi, homeland security adviser to Orban, said authorities caught 155 people trying to cross into the country illegally. They got across by damaging the fence, are now in police custody and are being charged with committing offences under the new laws. Authorities are quickly repairing the fence.

Hungarian officials also closed several of the seven border crossings with Serbia on Tuesday morning after deploying a train car covered with razor wire to close one of them. Two crossings were still open for regular traffic.

Chaos enveloped the main border crossing near Roszke, Hungary, as the Hungarians opened a tiny office in a metal container to process people and crowds pressed to squeeze inside. About 20 managed to get in, but thousands remained outside.

Another group of migrants blocked the main highway connecting Serbia and Hungary, saying they were refusing food and water until they are allowed to cross into Hungary. "No food, no water until open border," read one sign in English held up by a migrant.

Elsewhere along the migration route from the Middle East into Europe, asylum-seekers were considering what path to take into Europe with Hungary's border closed and Germany, Austria, Slovakia and the Netherlands reintroducing border controls in recent days to manage the largest refugee crisis Europe has seen since World War II.

Abolfazl Ebrahimi, a 17-year-old Afghan who was in Athens on Tuesday, said his group plans to pass through Croatia now that Hungary's border is closed.

"I thought that European people are kind and they will give us rights, but I don't think so (anymore) because the borders between Germany and Austria are closed, and Serbia and Hungary are closed too," he said, speaking at Victoria Square in central Athens.

Those who managed to make it into Hungary on Monday were grateful to be boarding buses for Austria.

Zakariah Sharfo, a mechanic from the Syrian city of Aleppo, said he couldn't understand the new hard-line Hungarian laws.

"Those who leave their country are fleeing because of the pressures of war," he said. "To escape death for a better life and to escape the pressures in our country. No one would leave their country without a good reason."

Migrants had rushed to beat the Hungarian deadline. A record 9,380 migrants entered Hungary on Monday, beating the previous record of 5,809 set just a day earlier.

Stranded migrants are desperate for Hungary to open its gates to allow passage into the European Union 2:03

Some 200,000 migrants have entered Hungary so far in 2015, nearly all by walking across the southern border with Serbia. Almost all, however, are on their way to Germany or other wealthy Western European nations.

Frontex, the European agency for the co-ordination of operations at the EU's external borders, said Tuesday that 156,000 migrants crossed the bloc's borders in August, marking the fifth consecutive monthly record.

Frontex also said that the number of migrants at Hungary's border with Serbia rose 20-fold to more than 52,000 in August.

In Aug, 156,000 migrants crossed EU borders, making this 5th consecutive monthly record <a href="http://t.co/YlUt4e7KY8">http://t.co/YlUt4e7KY8</a> <a href="http://t.co/WJTqV6SWkr">pic.twitter.com/WJTqV6SWkr</a> —@FrontexEU

​