The European Union stepped up pressure Wednesday on rebellious eastern states to take in their fair share of refugees under mandatory quotas adopted at the height of the migrant crisis.
Hungary and Slovakia looked set to see their appeal against the plan rejected after the advisor to the EU's top court said the quotas were a fair way of easing the pressure on Greece and Italy.
The European Commission meanwhile took its landmark legal action against Poland, Hungary and the Czech Republic to the next level over their refusal to take in any asylum-seekers under the system.
Judges also upheld the bloc's rules saying that asylum claims must be dealt with by the country where refugees first land. They said Croatia must accept migrants deported back from Austria and Slovenia.
A wave of people fleeing the war in Syria and conflict and poverty in other Middle Eastern and African countries in 2015 triggered Europe's biggest migration crisis since World War II.
EU Migration Commissioner Dimitris Avramopoulos called on the bloc to complete the plan to relocate 160,000 refugees from frontline Mediterranean states. But only 24,000 have been taken in by other member states for processing since the plan was agreed in 2015.
"What we need now is a final push to achieve our common goal of relocating the vast majority of the asylum seekers present and eligible in Greece and Italy by September," he said.
Avramopoulos said a record number of 3,000 refugees had been relocated in June. But he warned that pressure was building, especially on Italy which has called for special assistance after a surge in migrants crossing the Mediterranean.
He said Brussels was now taking forward legal steps against the Czech Republic, Hungary and Poland "for failing to meet their legal obligations on relocation" after they failed to meet a one-month deadline to respond to the EU's concerns.
The three countries could be hauled up before the European Court of Justice (ECJ) and eventually fined.
The Greek commissioner meanwhile hailed the advice given Wednesday by the ECJ's advocate general, or top legal official, which says that Hungary and Slovakia's appeal against the scheme should be struck down.
"He confirms that the relocation decisions are proportionate measures to alleviate the burden on Italy and Greece," Avramopoulos said.
Slovakia and Hungary filed lawsuits with the European Court of Justice in 2015 shortly after the bloc's leaders pushed through the mandatory quotas over their objections.
Advocates general of the ECJ are regularly called on to give their view before the court makes a final ruling. The court often but not always follows them.
In a separate case, the ECJ dismissed an appeal by a group of asylum-seekers against a decision by Austria and Slovenia to deport them back to Croatia.
They argued that the migration crisis had created exceptional circumstances, in effect suspending the EU's Dublin rules on where refugees must claim asylum, given that Germany had opened its doors to hundreds of thousands of migrants.
But the court backed Austria and Slovenia's decision to send the asylum seekers back to Croatia.
The migrant crisis has fuelled a split in the EU between frontline states like Italy and Greece and mostly eastern European countries that are opposed to migration and rejected mandatory quotas.