Refusing to take in asylum seekers from the Middle East that reached the European borders during the summer of 2015 was a breach of EU Law for Poland, Hungary and the Czech Republic, according to the Advocate General’s Eleanor V.E Sharpston‘s opinion to the European Court of Justice.

When the EU tried to assign each country a quota of people to shelter aim in order to relieve Southern Europe from the vast migration waves, East European countries refused to host any migrants within their borders, citing security concerns and saying that the EU had no legal grounds to force them to take the migrants.

“Ensuring the security of our citizens is the most important goal of the government’s policies,” said Piotr Muller, the Polish government spokesman, adding that his government’s actions were dictated by the interests of Polish citizens and the need to protect them from uncontrolled migration.

Sharpston’s opinion supports that of the European Court of Justice, which upheld a decision in September 2017 by the EU to force member states to take in a quota of asylum seekers, dismissing complaints by Hungary and Slovakia and said the EU had the authority to issue this sort of order.