Just weeks ago, thousands of migrants a day were streaming into northern Europe. Now the influx has been dramatically crimped and Austria is claiming much of the credit.

The small country at the heart of Europe traditionally is associated with schnitzel, Mozart and "The Sound of Music." More recently, it has also gained a reputation for a hard-nosed migration stance that has shaped Europe's response to the biggest migrant arrivals since World War II.

Austria's decision to shut down its border — the main transit route into the heart of Europe for most refugees — initially caused consternation among many in Europe. But senior Austrian politicians assert the decision helped forge last month's agreement between the EU and Turkey that commits Ankara to start taking back migrants who pay smugglers to make dangerous sea crossings to the Greek islands.

"I believe that we played a significant role in ... finding a solution for the migration crisis," Austrian Foreign Minister Sebastian Kurz told The Associated Press ahead of the first expected migrant returns from Greece to Turkey on Monday.

The premise behind the deal is that Europe will send back to Turkey anyone from any country who doesn't qualify for asylum or has tried to evade a rigorous asylum application process. For every person sent back, EU countries would take in one person confirmed to have made a legitimate asylum request.

Austria — and other eastern European nations — argue that their decision to close their borders leading from Greece through the Balkans and into prosperous northern Europe enabled the deal with Turkey to happen by creating new facts on the ground.

Those facts include having over 50,000 migrants pile up in Greece, as borders further north closed and boatloads of people still poured across its vast Aegean Sea border daily from Turkey.

The Austrian decision meant there would be no more "waving through" of migrants as they sought to get to Austria, Sweden or Germany, which alone accepted more than 1 million refugees last year. As the Balkan route shut down, the sufferings of migrants trapped in makeshift camps in northern Greece, notably around the border village of Idomeni, laid bare the scale of the human misery and increased pressure within the EU to act.

"The right measures were taken on the European level (only) after Austria's outcry," Austrian Chancellor Werner Faymann told reporters.

Others see a more nuanced picture.

Anton Pelinka, a politics professor at Eotvoes Lorant University in the Hungarian capital of Budapest, says it was Hungary that played a big role in the EU's new approach. Hungarian Prime Minister Viktor Orban was arguably the first to reject German-led attempts to allow the migrants free passage through Europe with his migrant quotas and his razor-wire border fences.

"Hungary was in fact the initiator of what then consequently was put into force in the Balkans," he said.

Still, Austria's decision to impose daily caps on those seeking asylum at its southeastern border as of Feb. 19 sent ripples of alarm through countries along the migrant route, from Slovenia to Croatia, Serbia and Macedonia.

Austrian and Balkan route police chiefs on Feb. 18 called for the migrant flow "to be reduced to the greatest possible extent." A day later, Austria imposed caps both on the number of asylum seekers it would accept daily and overall for the whole year. Five days later on Feb. 24, foreign and interior ministers from Austria and its southern neighbors made it formal — tightening border controls and announcing that a complete shutdown of the route was looming.

The move was initially met by harsh criticism. The EU said Austria's clampdown on asylum seekers contravened international law. Greece recalled its ambassador to Vienna and U.N. Secretary-General Ban Ki-moon said the border restrictions "are not in line with international law or with common human decency."

But the mood has changed.

While declining to comment on Austria's role in the migrant debate, EU migration spokeswoman Tove Ernst echoed the language coming out of Vienna, saying all members "must commit to ending the 'wave-through' approach to those who indicate an interest in applying for asylum elsewhere."

The move to shut the Balkans route was drastic — but it worked. Figures provided Friday to the AP show the number of new refugee arrivals registered by German police dropped from an average of over 2,000 daily at the start of the year to several hundred from the middle of February. Currently, about 100 people are being recorded each day.

Kurz suggested other EU nations had just been waiting for an opening to fall in line.

"The fact that our path was the right one revealed itself after only a few weeks," he said, asserting that all 28 EU nations endorsed an end to the unfettered migration shortly after Macedonia, Serbia and Croatia also shut their borders.

"I can stand criticism from here and there, particularly when it comes from those who after a few weeks agree to what we suggested," he said.

___

Associated Press writers Frank Jordans in Berlin and Dusan Stojanovic in Belgrade contributed.