Nearly three years after the migrant crisis flooded the Mediterranean countries on the EU’s southern flank with hundreds of thousands of mostly Middle Eastern and African refugees, a top Greek court ruled on April 18 that the migrants who have been stranded on several Greek islands should no longer be held there while asylum claims are assessed and must be allowed into mainland Greece.

Greece’s highest court overturned the Greek Asylum Service’s decision to impose geographical restrictions on asylum-seekers arriving on the Greek islands of Lesvos, Rhodes, Samos, Kos, Leros, and Chios -a move that has alarmed the European Union institutions in Brussels, with one EU official describing the ruling as a “major concern”.

Since signing a controversial deal with Turkey on March 20, 2016, asylum-seekers arriving on the Greek islands have not been allowed to move onto mainland Greece because they are expected to be returned to Turkey.

“Forcing asylum-seekers to stay on the Greek islands, often in squalid, overcrowded conditions, is deeply unfair. With the highest court in Greece now having ruled that the government had no grounds for this inhumane containment, the authorities must now allow all newly arriving asylum-seekers into mainland Greece,” before adding, “This ruling also highlights the disproportionate responsibility shouldered by some Greek islands compared to other European regions. European policies such as the EU-Turkey deal, designed to keep refugees out of sight — either in ‘third’ countries or on Greek islands — must be replaced by policies which ensure that responsibility for refugees is shared by all.”

The Council of State, Greece’s top administrative court, overturned the decision after it found no “serious and overriding reasons of public interest and migration policy to justify the imposition of restriction on movement”, a court official said.

Judges noted the islands had to manage a significant number of people seeking international protection while dealing with Greece’s financial crisis. There were also risks of social tensions that could hurt the local economy because the islands are also tourist destinations.

Stopping migrants making the short crossing from Turkey is a key part of European Union policy aimed at avoiding a repeat of the crisis of 2015 when over a million migrants, many of them Syrian refugees, made it to Germany.

The prospect of new arrivals, often fleeing violence in the Middle East via Turkey, being able to quickly reach mainland Europe from the islands could undermine EU efforts to discourage people leaving Turkey or deterring the Turkish government of using the refugee crisis as a threat to gain political concessions from the EU, a move that Turkey’s authoritarian President Recep Tayyip Erdogan has threatened since the deal was signed.

The restriction on leaving the islands, imposed by Greece’s Asylum Service, has resulted in severely overcrowded camps and violent protests over delays in asylum decisions. More than 15,000 asylum-seekers are living in five island camps, more than double their capacity, according to government data.