Hungary on Monday gave its army drastic new powers to stem illegal migration ahead of two key European Union meetings on how to handle the unrelenting stream of refugees entering Europe.
Hundreds of thousands fleeing conflict and poverty have already made it into western Europe this year, with Austria registering 22,700 arrivals this weekend alone, after being shunted from one Balkan country to another as they travelled up from Greece.
Lawmakers in Hungary, which sealed off its border with Serbia last week to stop the flood of people heading north, on Monday approved a final package of sweeping new anti-migrant laws.
Under the legislation, the army can participate in border control and may use non-lethal force, while police will be able to enter private homes to look for illegal migrants.
"Soldiers deployed to the border can use coercive weapons designed to cause bodily harm, although in a non-lethal way, unless it cannot be avoided," it says, referring to rubber bullets, tear gas grenades and net guns.
Last week, other legislation came into force allowing Hungary to jail anyone caught crossing the border illegally, which carries a maximum fine of five years in prison.
Prime Minister Viktor Orban told lawmakers in Budapest that migrants were "overrunning" Europe.
"They're not just banging on the door, they're breaking the door down on top of us," the 52-year-old right-winger said.
"Our borders are in danger, our way of life built on respect for the law, Hungary and the whole of Europe is in danger."
The continent's worst migration crisis since World War II has exposed deep rifts within the 28-nation European Union, particularly between members in the former communist east and the wealthier west, the migrants' preferred destination.
EU interior ministers will meet tomorrow ahead of a bloc-wide emergency summit on Wednesday.
Today, foreign ministers of the Czech Republic, Hungary, Poland, Slovakia and Latvia -- all of which reject proposals for binding migrant quotas championed by Germany -- met in Prague with their counterpart from Luxembourg, which holds the EU presidency.
Polish foreign minister Grzegorz Schetyna said Warsaw could take in more refugees than its share under the proposed European Union quota plan to relocate 120,000 people, but stressed this should be on a voluntary basis and under certain conditions.
After the talks, Czech foreign minister Lubomir Zaoralek insisted they were "absolutely dedicated" to reaching an agreement with fellow EU nations.