(CNN)The European Court of Justice (ECJ) has rejected a challenge brought by Hungary and Slovakia against the European Union's power to force member states to admit asylum seekers.
Top EU court rejects Hungary and Slovakia migrant relocation case
The two nations opposed a 2015 decision by the EU's top policy body, at the height of the Mediterranean migration crisis, to assist Italy and Greece by making other EU states admit 120,000 people.
"That mechanism actually contributes to enabling Greece and Italy to deal with the impact of the 2015 migration crisis and is proportionate," a news release on the ECJ's ruling said.
The court "dismisses in their entirety the actions brought by Slovakia and Hungary," it said.
Hungary and Slovakia, along with the Czech Republic and Romania, had opposed the 2015 decision, taken by the Council of the European Union. The formerly Communist nations in eastern Europe claimed they would struggle to absorb mainly Muslim refugees from Syria.
In their case before the ECJ, Hungary and Slovakia argued that there had been procedural flaws and that the decision was neither a suitable response to the migrant crisis nor necessary to deal with it.
While Poland backed their case before the court, Belgium, Germany, Greece, France, Italy, Luxembourg, Sweden and the European Commission argued in support of the council, the ECJ press release said.
In its ruling Wednesday, the court rejected all the arguments brought by Hungary and Slovakia.
The measures were legally taken by the EU Council and did not require ratification by individual governments, its news release said. "Its adoption was not subject to the requirements relating to the participation of national Parliaments and to the public nature of the deliberations and vote in the Council."
It also noted that retrospective assessments of how effective the decision had been could not be used to question its legality.
The court "observes in particular that the small number of relocations so far carried out under the contested decision can be explained by a series of factors that the Council could not have foreseen at the time when the decision was adopted, including, in particular, the lack of cooperation on the part of certain Member States," it said.
The European Commission warned EU member states earlier this year that there were "no more excuses" for not delivering on promises to take on refugees.
According to the International Organization for Migration, as of August 30 this year, only 27,412 people had been relocated to 24 countries, compared with the 120,000 provided for by the scheme. Of those, 19,200 were transferred from Greece and 8,212 from Italy. Germany, France and the Netherlands have taken in the highest number.
Under the emergency scheme, 120,000 relocations were due to take place over two years, ending in September 2017.