Hungary's parliament on Monday overwhelmingly approved the construction of a controversial fence on the border with Serbia to keep out migrants, under new legislation that also tightens asylum application rules.
The plans for the four-metre (13-foot) high barrier announced by populist Prime Minister Viktor Orban last month triggered concern both in Serbia and the European Union, which is struggling to control a massive influx of migrants from the Middle East and Africa.
"Hungary is confronted with the biggest surge of migrants in its history, its capacities are overloaded by 130 percent," Interior Minister Sandor Pinter said before the vote.
Lawmakers voted by 151 to 41 in favour of new legislation allowing the building of the fence along the 175-kilometre (110-mile) border with Serbia, which unlike Hungary is not an EU member.
The new laws also toughen asylum application rules, allowing for the detention of migrants in temporary camps, as well as speeding up the review process and limiting the possibility for appeal.
Over the last two years, Hungary has been one of the main routes for people hoping to cross into Austria and Germany, most coming from Afghanistan, Iraq, Syria and Kosovo.
Hungary is in the EU's passport-free Schengen zone which means that once migrants are inside the country, they can travel freely elsewhere.