A protester holds a banner in front of the Austrian embassy in Athens during a demonstration against a decision of Slovenia, Austria, Macedonia, Serbia and Croatia to limit the crossings of migrants. The European Court of Justice on Wednesday affirmed Austria and Slovenia's right to deport migrants back to the state from where they first arrived | Milos Bicanski/Getty Images Top court clears Austria, Slovenia of turning back asylum seekers European Court of Justice rules it was lawful to return migrants to Croatia, the country where they entered the EU.

Austria and Slovenia were entitled to deport migrants during the 2015-2016 migration crisis back to the state where they first arrived, according to a ruling from the European Court of Justice on Wednesday.

The case establishes that the Dublin Regulations — which state that an asylum seeker's application must be processed in the EU country of arrival — applied during the crisis.

The landmark ruling in effect dismissed the notion that migration during 2015-2016 was an "exceptional circumstance" despite more than a million arrivals on European shores — a number that the EU struggled to both logistically and politically manage — in 2015 alone. And it clears Austria and Slovenia for returning hundreds of migrants back to Croatia, the first EU country that many of the returned migrants first arrived in.

Allowing an EU country of arrival — Croatia in this case — to wave on migrants to their final destination without examining their applications "would be incompatible with the Dublin III Regulation," the court determined, and "a member state cannot be absolved" of the responsibility to examine the asylum application of those migrants who first entered the EU country.

The decision also overruled the ECJ advocate general's opinion, which was non-binding, that the refugee crisis was an exceptional circumstance under which countries where the asylum application was filed — not necessarily the country of arrival — are responsible for examining those applications.

The case in particular involved two Afghan women and a Syrian man who were returned from Austria and Slovenia respectively to Croatia, their first EU point of entry. Both parties appealed the governments' decision.

The ruling may create problems for Italy, where 81,000 migrants have arrived this year, 14,000 more than the same period last year. Italy has demanded that the burden of hosting and resettling migrants ought to be shared by all EU countries, but many countries, particularly in Eastern Europe, refuse to host any. The ECJ ruling may allow countries to return migrants to Italy if they seek to apply for asylum anywhere else.

To stem the flow of migrants, the EU struck a deal with Turkey last year whereby it would receive €3 billion and fewer visa restrictions in exchange for preventing migrants from leaving for European shores and taking back returned migrants from Europe. While the agreement has broadly succeeded, stemming migrants flows across the so-called Balkan route, migrants boats leaving from Libya are still arriving in Italy.

“The levels with which Italy is faced now means that everybody needs to do their part in this across Europe,” said Commission First Vice President Frans Timmermans. “This is solidarity that Italy deserves.”