Migrants wait to cross the border from Slovenia into Spielfeld in Austria, February 16, 2016. REUTERS/Leonhard Foeger

VIENNA (Reuters) - Ever tighter restrictions on migrants and refugees in Europe are giving the wrong signal about countries’ obligations under international humanitarian law, U.N. Secretary-General Ban Ki-moon said on Thursday.

Ban, the first foreign dignitary to address a session of the Austrian parliament, expressed his concern a day after lawmakers passed some of Europe’s toughest asylum rules and plans for a fence at Austria’s Alpine border with Italy were unveiled.

“I am alarmed about growing xenophobia here and beyond,” he said during a visit to Austria, where anti-immigrant far-right candidate Norbert Hofer won over a third of the votes in a first round of a presidential election and faces a run-off next month.

“European countries are now adopting increasingly restrictive immigration and refugee policies,” Ban said. “Such policies and measures send a very negative message about the obligations of member states under international humanitarian law and European law”.

He said he would welcome open discussions in Europe on integration and called on all European Union leaders to live up to the principles that have guided them in the past.

Under the law passed on Wednesday, Austria will be able to turn migrants away at the border within an hour if lawmakers decree public order is threatened.

Austria has mostly served as a conduit into Germany for refugees and migrants from the Middle East and Africa but it has also absorbed around 100,000 asylum seekers since last summer.

After initially welcoming refugees, the government capped the number of asylum claims it would accept this year to 37,500. It has already received more than 16,000 claims since January.

Vienna has also imposed restrictions on movement, including coordinating border closures with nearby Balkan countries over the past months. It is now preparing stricter border controls at the important Brenner Pass Alpine crossing with Italy.