Hungary approved plans on Tuesday to detain migrants in camps on its border, state news agency MTI said, a step which the United Nations said violates European Union law and will have a "terrible physical and psychological impact" on asylum seekers.

The measures, passed by parliament, will also tighten controls on Hungary's border, which has been a focal point of Europe's migration crisis since 2015.

The southern border with Serbia marks the external frontier of the EU's passport-free Schengen area, and hundreds of thousands of people have crossed into the country.