The European Union's top court has ruled that Poland, Hungary and the Czech Republic broke the law by refusing to host refugees to help ease the burden on southern states such as Greece and Italy after a surge in migrant arrivals from 2015.

The ruling underscores Europe's bitter divisions over migration, though the three ex-communist nations face no immediate penalty as the relocation of tens of thousands of people agreed by the EU was only envisaged until 2017.

"By refusing to comply with the temporary mechanism for the relocation of applicants for international protection, Poland, Hungary and the Czech Republic have failed to fulfil their obligations under European Union law," the Luxembourg-based Court of Justice of the European Union said in its ruling.

The eurosceptic, nationalist governments on the EU's eastern flank had cited national security reasons in refusing to take in any of the mostly Muslim refugees and migrants who had fled wars and poverty in the Middle East, North Africa and beyond.

Frontline states such as Italy and Greece complained angrily over the lack of European solidarity as they struggled with mass arrivals that overwhelmed their security and welfare systems.

Wealthy northern European states such as Germany also criticised the ex-communist east for refusing to help while continuing to benefit from generous EU financial aid.

More than one million people reached Europe's shores from across the Mediterranean in 2015, catching the EU unprepared as they trekked across the continent and triggering a new wave of support in some quarters for far-right, anti-immigrant parties.

The EU has since cracked down on immigration, fortifying its external borders and offering money and aid to countries such as Turkey to help prevent migrants from heading to Europe.

But the internal EU divisions on migration are far from healed. The 2015 mass influx of migrants at least partly contributed to Britain's 2016 decision to leave the EU, in the worst setback for European integration since World War Two.

The EU now faces a fresh test of its unity from the Covid-19 pandemic, with member states mostly pursuing their own strategies to counter the spread of the disease and the worst affected nations - Italy and Spain - again complaining of a lack of European solidarity and aid.

Viktor Orban

Meanwhile, European Commission chief Ursula von der Leyen has expressed "particular" concern over a coronavirus emergency law in Hungary that has given nationalist premier Viktor Orban sweeping powers.

While saying EU countries may need extraordinary measures to tackle the pandemic, she added: "I am concerned that certain measures go too far -- and I'm particularly concerned with the situation in Hungary."

Hungary's parliament, dominated by Orban's ruling party, handed the prime minister the power from Tuesday to rule by decree until his government decides the virus crisis is over.

The emergency law also threatens journalists with prison if they publish  "falsehoods" about the virus or the government's actions to slow it.

The law has sparked alarm among rights groups, media organisations and several EU countries, with fears it was a power grab by Orban, who has ruled Hungary for the past decade.

The leaders of 13 European People's Party parties today called for Orban's party Fidesz to be expelled and for the European Commission to "address the situation in Hungary forcefully", with the Greek and Norwegian prime ministers among the signatories.