The laws, among the toughest European responses to the migrant crisis
, come as the country prepares to build further fences along its borders, and amid public anger over a shocking child rape case involving an Iraqi migrant.
The legislation, passed Wednesday, allows Austria's government to declare a state of emergency over migration if it deems the country lacks the capacity to receive, house and integrate the number of people who want to enter, said Austrian Interior Ministry spokesman Karl-Heinz Grundboeck.
He said it would give authorities sweeping powers to block migrants from entering if they deem the country from which they are directly entering -- not their homeland -- is safe.
Amnesty: New laws breach international obligations
Gauri van Gulik, Amnesty International's deputy director for Europe and Central Asia, said the laws were "a glaring attempt to keep people out of Austria and its asylum system."
The measures would breach its obligations under international law by preventing access to protection for thousands of refugees, Amnesty said.
Addressing Austria's Parliament on Thursday, U.N. Secretary-General Ban Ki-moon said he was "concerned that European countries are now adopting increasingly restrictive immigration and refugee policies."
"Such policies and measures negatively affect the obligations of member states under international humanitarian law and European law," he said.
"I welcome the open discussions in Europe -- including in Austria -- on integration. But I am alarmed again about growing xenophobia here and beyond. All of Europe's leaders should live up to the principles that have guided this continent."
But Grundboeck, the Interior Ministry spokesman, said Austria's measures were necessary as vast numbers of refugees and migrants from the Middle East and Africa continue to make their way along the so-called Balkan route through southeastern European countries to prosperous "destination countries" in the north.
"What we cannot accept is that migrants just transit through countries without being registered and accommodated," he said.
Austria has been primarily a transit point into Germany, the main destination country for migrants.
But it also received more than 88,000 asylum applications last year, he said.
New border fences proposed
The laws were passed as Austrian authorities announced they were making preparations to be able to erect a 370-meter (404-yard) fence at the Brenner Pass on the border with Italy as well as fences at two border crossings to Hungary.
Grundboeck said the preparations were in place so that authorities would be able to erect the fences if migrant flows required it.
A fence was recently erected along the Spielfeld border crossing between Austria and Slovenia, he said.
Italian Prime Minister Matteo Renzi condemned the news of the potential closure of the Brenner Pass, saying that "the possibility of closing the Brenner is blatantly against the European rules, as well as against history, against logic and against the future."
Horrifying rape case
The moves in Austria comes days after the far-right Freedom Party won the first round of the country's presidential elections, and as the trial of an Iraqi asylum seeker accused of raping a child played out this week in a court in Vienna.
The defendant, 20, has been charged in the rape of a 10-year-old boy at a swimming pool in December.
He admitted the attack in court Tuesday, a spokeswoman for the criminal court in Vienna told CNN.
She said the case had been postponed as the court awaited a report on the victim from a child psychologist. If the victim is found to be suffering serious psychological consequences, the sentence could be increased from a potential 10 years to 15 years, she said.
The man told police he had committed the attack due to a "sexual emergency" as he had not seen his wife in four months, prosecutors said.
Initial stance was more welcoming
The case has contributed to hardening attitudes toward migrants in Austria, which initially responded to the migrant crisis with a more welcoming stance.
Earlier this month, the first migrants were deported from Europe to Turkey
as part of a controversial new deal between the European Union and Ankara to tackle the migration crisis.
The plan was agreed upon last month as Europe struggles to respond to the largest migration crisis since World War II. More than 1 million people made "irregular arrivals" inside Europe's borders in 2015 alone, many of them displaced by the Syrian civil war.