Migrant crisis: UN's Ban Ki-moon condemns EU migrant curbs
UN Secretary General Ban Ki-moon has criticised "increasingly restrictive" policies on migrants in Europe.
In a speech to the Austrian parliament, he said such curbs ran counter to member countries' international duties.
He was speaking a day after Austrian MPs approved a draft law restricting asylum rights and allowing most claims to be rejected at the border.
The European Union, including Austria, is struggling to cope with a huge influx of mainly Syrian migrants.
More than a million people arrived in Europe last year sparking the worst refugee crisis on the continent since World War Two, and creating division in the EU over how to deal with it.
"I am concerned that European countries are now adopting increasingly restrictive immigration and refugee policies," Mr Ban told MPs in Vienna.
"Such policies negatively affect the obligation of member states under international humanitarian law and European law."
Mr Ban did not name any country but, given the venue, the speech has been widely interpreted as being aimed at least in part at Austria, correspondents say.
The country's new bill would allow the government to declare a "state of emergency" over migrants and to reject most asylum-seekers, including those from Syria.
It also limits any successful claim to asylum status to three years.
Interior Minister Wolfgang Sobotka said Austria had no other choice as long as "so many other EU members fail to do their part" to limit the influx.
The legislation, which now goes to the upper house, has been condemned by rights groups, including Amnesty International and Human Rights Watch.
Austria has also proposed building a 400m (1,300ft) fence at the main border crossing with Italy, the Brenner Pass.
Officials said the move would depend on Italy's willingness to co-operate. However, the Italian government said closing the Brenner Pass would go against European law.
Many of the migrants attempting to reach Germany and other northern EU countries go via the Western Balkans.
Hungary first tried to block their route with a fence. Other countries, such as Slovenia and Bulgaria, have erected similar obstacles.
Macedonia has decided only to allow Syrian and Iraqi migrants across its frontiers.
As a result, thousands of migrants have been stranded in makeshift camps in Greece.
Meanwhile Italy has announced it is to start fingerprinting migrants crossing the Mediterranean as soon as they are picked up by rescue boats.
The European Commission has pressed Italy to register migrants as they arrive, and to carry out systematic checks of fingerprints against a EU-wide database.