The obligatory relocation of asylum seekers within the bloc is a "proportionate" means of enabling Greece and Italy to deal with the migration crisis, the European Court of Justice (ECJ) was told on Wednesday.

The ECJ's Advocate General Yves Bot, who was tasked with advising judges on the case, recommended that a lawsuit brought by Hungary and Slovakia should be dismissed.

"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," Bot said.

A ruling is expected later this year. While the court is not obliged to follow the advice, it generally does.

Read more: EU relocations: the good, the bad, and the ugly

The leader of Germany's Social Democrats Martin Schulz said the ruling showed that Europe needed to "help Italy quickly."

He added that wider reforms were needed. "Alongside secure external borders we finally also need legal ways (for migrants) to get to Europe."

Hungary and Slovakia have called for the cancellation of a mandatory quota to relocate refugees within the bloc. They say the EU breached its own legislative rules when a majority of member states voted on refugee quotas in September 2015.

The effective closure of the Balkan route has caused big problems for Greece, which is struggling to cope

Overstepping the mark?

The two countries argue that the EU was acting beyond its powers with the binding decision to redistribute up to 120,000 refugees from Italy and Greece across the bloc.

However, Bot said the EU did not overreach its competences because EU treaties allow the adoption of measures to address clearly identified emergency situations.

After the opinion was announced on Wednesday, the EU Commission said it had sent a formal request to the Czech Republic, Hungary, and Poland to apply EU rules on migrants. The countries have one month to respond.

"Despite repeated calls for action... these three countries remain in breach of their legal obligations and have shown disregard for their commitments to Greece, Italy and other member states," the EU executive said.

The Commission can take the countries to court if it is not satisfied by their response.

The resettlement program was introduced to help ease pressure on asylum systems in Greece and Italy after record arrivals of immigrants across the Mediterranean and through Turkey.

Read more: Their last resort - refugees in Greece go on hunger strike

Hungary, Slovakia, Romania and the Czech Republic voted against the measure and Slovakia and Hungary brought their lawsuit against the European Union in December 2015.

Euroskeptic governments in Warsaw and Budapest have refused to take in any asylum-seeker under the EU scheme. Slovakia and the Czech Republic have also held back, citing security concerns following a spate of Islamist attacks in Europe.

Court backs Austrian pushback

Meanwhile, the ECJ issued a ruling that backed Austria and Slovenia for their deportations of asylum seekers back to Croatia.

Croatia had transported asylum seekers, who originally arrived from non-EU Serbia, to the border with Slovenia so they could file applications in other countries.

Read more: Opinion - The illusion of a common EU asylum policy

One group of asylum seekers that filed a lawsuit had argued that the 2015 migration crisis had created "exceptional circumstances" that suspended the Dublin rules more widely. However, the court ruled Zagreb was wrong in doing so.

"A member state which has decided on humanitarian grounds to authorize the entry on its territory of a non-EU national who does not have a visa... cannot be absolved of that responsibility," the ruling said.

The ECJ said the Dublin regulations, which require refugees to seek asylum in the first bloc member state they reach, should apply even in exceptional circumstances.

In 2015 more than 850,000 people - many fleeing conflict in Syria, Iraq and Afghanistan - crossed the Balkan route. Many were intending to reach mainly Germany, which itself suspended the Dublin rules.

rc/ng (dpa, Reuters)