GETTY•AP Hungarian soldiers guard the country's barbed wire border fence

FREE now and never miss the top politics stories again. SUBSCRIBE Invalid email Sign up fornow and never miss the top politics stories again. We will use your email address only for sending you newsletters. Please see our Privacy Notice for details of your data protection rights.

Heavily armed soldiers were set to be dispatched to defend the frontier today after Hungary's parliament voted in favour of a fresh crackdown on the thousands of migrants who have massed there trying to get into the EU. MPs have passed a new law allowing troops to use rubber bullets, flares, stun grenades and net guns against anyone who tries to break through the country's controversial barbed wire fence.

REUTERS Migrants hang their washing out to dry on Hungary's border fence

Hungarian prime minister Viktor Orban spoke of the need for his country to protect itself and the rest of Europe from the "threat" of mass migration shortly before the bill was passed by parliament this morning. His centre-right Fidesz had proposed the use of escalating force against migrants as central European countries struggle to cope with the overwhelming tide of people. It was supported by the radical nationalist Jobbik party, which has advocated even tougher measures, meaning the bill passed with 151 votes to 12 against and 27 abstentions in the 199-member parliament.

REUTERS Soldiers repair part of Hungary's border fence

Before MPs voted on the legislation, Mr Orban told them: "Our borders are under threat, our life based on a respect for laws...and the whole of Europe. We are being run over. "There are a few million coming and the European Union is weak. Hungary is in danger and if countries need to they should be able to build fences." He added: "Our borders are in danger. Our way of life where we respect the law is in danger. "The whole of Hungary and Europe is in danger. They [the migrants] are blitzing us."

REUTERS A soldier watches migrants on the Hungary Serbia border

The controversial leader also reiterated his view that the migrant quotas proposed by Brussels were not a "European action plan" as first the borders must be protected and the flow of migrants stopped. Budapest, which has received 54,000 migrants this year alone, had made it a criminal offence to cross the border but insisted vigilant checks will still remain in place. At least 20,000 migrants flooded into neighbouring Austria this weekend as Europe's migrant crisis continued to spiral out of control. Croatia became the latest nation to make a desperate attempt to restore order at its borders, having just days earlier promised all migrants free passage through to western Europe.