VIENNA (AP) — Austria was among the first countries in Europe to put out the welcome mat when waves of people fleeing war and poverty reached the continent. Now, its focus is showing them the door.

Parliament is set to pass a law stripping pocket money, food and shelter from those denied asylum, potentially leaving them on the street. The interior minister proudly touts figures showing Austria as the European Union's per-capita leader in expelling those rejected.

Austrian courts are toughening up too. On Thursday, eight Iraqi men were sent to prison for up to 13 years for the gang rape of a German woman on New Year's Eve more than a year ago.

Lawyer Andreas Reichenbach, who defended one of the men, said the stiff sentences were a signal to migrants that "when they come to Austria, that such behavior won't be tolerated."

In Germany, where during the height of the influx Chancellor Angela Merkel insisted "we will manage," the government now considers some areas of Afghanistan "safe," and has started returning failed asylum-seekers to those regions. Additional tough measures have followed Berlin's deadly Christmas market attack by rejected Tunisian asylum-seeker Anis Amri and gains by the nationalist Alternative for Germany party.

The pro-migrant attitudes that once led thousands of Austrian volunteers to turn out with food, shelter and advice to the first asylum-seekers are still heard some places, but they appear outnumbered.

"We have to keep welcoming those who have nowhere else to go," said Marlis Bosch. "We in Austria have more than enough to share."

A survey of 10 EU member countries last month showed 65 percent of the 1,000 Austrian respondents favored stopping all immigration from Muslim nations. Only Poles scored higher — at 71 percent — on Britain's Royal Institute of International Affairs survey. But anti-migrant sentiment in Poland has been fueled by the government. Not so in Austria.

Former Chancellor Werner Faymann urged Austrians to deal generously with migrants as late as fall 2015, even as his government worked to secure its borders. But he was forced out last year after migrant policies threatened to tear apart his government coalition after he took a harder line.

Story continues

His successor, Christian Kern, has found little choice but to stay tough — or risk boosting the right-wing Freedom Party and its message that migrants are overwhelmingly behind the kind of crimes the eight Iraqis were convicted of Thursday.

Freedom Party candidate Norbert Hofer, who advocates a tough line on migrants, was narrowly defeated in December in Austria's presidential election. Polls continue to show his populist party with the most voter support.

But Kern's Social Democrats have almost caught up since he took office less than nine months ago and continued hardening the country's migrant policies.

Also gaining support on a tougher migrant stance is the centrist People's Party, the Social Democrats' coalition partner. Party member Sebastian Kurz, Austria's foreign minister, is advocating setting up North African holding camps for would-be emigres from there.

The Austrian government plans to stop all support for those whose asylum requests have been rejected — including meals, shelter and a monthly allowance of 40 euros (about $40). If Interior Minister Wolfgang Sobotka has his way, those refusing to leave will also pay high fines and end up in compounds until they are forcibly deported.

The coalition's majority in parliament means that approval of the draft law is virtually certain.

Still, some members of Kern's Social Democratic party have joined with human rights advocates who say its passage could lead to increased misery for thousands and a possible rise in crime.

"Families with children, or the sick, all could end up on the street from one day or the other," warns Christoph Pinter of the U.N. refugee organization UNHCR.

Sobotka shrugs, reflecting Austria's sharp about-turn on migrants.

"Who is contravening the law — me or those who do not leave the country?" he asked reporters. "My responsibility is enforcing the law."

___

Associated Press writer Kirsten Grieshaber in Berlin and AP video journalist Philipp Moritz Jenne in Vienna contributed to this story.