LUXEMBOURG (Reuters) - The top European Union court’s adviser on Wednesday dismissed a challenge brought by Slovakia and Hungary against the obligatory relocation of refugees across the bloc, dealing a blow to the easterners’ migration battles that upset their EU peers.

FILE PHOTO: Migrants on a wooden boat await rescue by the Malta-based NGO Migrant Offshore Aid Station (MOAS) in the central Mediterranean in international waters off the coast of Sabratha in Libya, April 15, 2017. REUTERS/Darrin Zammit Lupi/File Photo

The two states - backed by their neighbor Poland - wanted the court to annul a 2015 EU scheme to have each member state host a number of refugees to help ease pressure on Greece and Italy, struggling with mass arrivals across the Mediterranean.

But the court’s Advocate General Yves Bot rejected the procedural arguments presented by Bratislava and Budapest that obligatory quotas were unlawful.

“The contested decision automatically helps to relieve the considerable pressure on the asylum systems of Italy and Greece following the migration crisis in the summer of 2015 and ... is thus appropriate for attaining the objective which it pursues,” he said.

A final ECJ ruling is expected after the summer break. The court does not have to but generally does follow the advisory opinion of the Advocate General.

The nationalist-minded, euroskeptic governments in Warsaw and Budapest have refused to take in a single asylum-seeker under the plan. Slovakia and the Czech Republic have also stalled, citing security concerns after a raft of Islamist attacks in the EU in recent years.

Their reluctance to help the two southern frontline states, as well as wealthier EU countries such as Germany, which has taken in hundreds of thousands of migrants, have precipitated bitter disputes in the bloc and weakened its unity.

Slovakia’s Prime Minister Robert Fico said in a statement his government was sticking to its decision to refuse mandatory quotas and called the Advocate General’s opinion “non binding”.

Hungary dismissed the ruling as politically motivated.

“The main elements of the statement are political, which are practically used to disguise the fact that there are no legal arguments in it,” Pal Volner, state secretary of the Justice Ministry, was cited as saying by the state news agency MTI.

GATEWAY TO EUROPE

The bloc’s executive Commission last month launched legal cases against Poland, Hungary and the Czech Republic for defaulting on their legal obligations.

It stepped the cases up on Wednesday, while EU’s Migration Commission Dimitris Avramopoulos welcomed the court’s advisory opinion

“None of the arguments they put forward justify that they don’t implement the relocation decision,” he said.

The European Commission said on Wednesday that some 24,700 people had been moved from Greece and Italy under the plan that had been due to cover 160,000.

It said it had earmarked 377.5 million euros - or 10,000 euros per person - for 2018 for a twin scheme to legally bring to Europe asylum seekers from places such as Turkey, Libya or Niger, rather than have people risk their lives in perilous Mediterranean crossings operated by smugglers.

A 2016 deal with Ankara drastically cut arrivals from Turkey to Greece, making Italy the main gateway to Europe now, with some 94,400 arrivals so far this year across the sea.

Brussels offered Italy extra money and help, and urged EU states to step up relocations from that country. It also said Rome had to improve registration of those arriving, especially some 25,000 Eritreans, to qualify them for the move.

In other judgments, the Luxembourg-based court said Austria and Slovenia were right in 2016 to send back a Syrian national and two Afghan families back to Croatia to handle their asylum applications, as it was their first country of entry to the EU.

The ECJ also ruled that an Eritrean who had sought asylum in Germany in 2015 was right to expect that country to handle his case because he has already been there for more than three months, rather than be sent back to Italy, through which he had first entered the EU.