Hungarian Foreign Minister Peter Szijjarto called the court ruling "outrageous and irresponsible".
Slovakia's Prime Minister Robert Fico stressed the fact that the migration mechanism expires on September 26, because it was meant as temporary.
"This decision jeopardises the security and future of all of Europe", he told a press conference, adding that the decion was political.
The Czech Republic and Romania have also voiced criticisms of the plan, but only Slovakia and Hungary took legal action. Hungary and Poland have not accepted any migrants within the mechanism, while the Czech Republic stopped accepting refugees in August 2016.
"This absolutely does not change the position of the Polish government with respect to migration policy", she said.
Slovakia respects European Union court ruling on refugees, position unchanged - PM
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.
While Brussels has insisted the move is necessary to help deal with the 1.6 million people who arrived in Greece and Italy since 2014, the countries say it is not their responsibility. Hungary has admitted none, but Slovakia has taken in a handful. "Few E.U. member states have actually met their relocation quota, and most were just a lot more passive about it". The decision is also likely to be welcomed by other countries such as Greece and Sweden, where the sheer volume of new arrivals threatens to overwhelm the system.
The case has highlighted a deep divide in the European Union as it has fumbled for a joint solution to the mass arrivals that have strained resources, roiled politics, and prompted outcries from human rights defenders who warn that the bloc risks violating global law on the treatment of refugees.
The group's European Union office director, Iverna McGowan, said that "Slovakia and Hungary have tried to dodge the EU's system for solidarity, but each country has a role to play in protecting people fleeing violence and persecution".
That tally is less than half the arrivals registered in the same period previous year, when 289,681 people arrived across the region through September 3, 2016, and 3,238 died at sea. More than 2,500 people have died on the Mediterranean journey, the group said.
Windows Fall Creators Update available from October 17th
The timeline feature which will be a part of the Fall Creators Update is one of the most important updates coming to Windows 10 . The updates will be available for download through the standard Windows update feature in October.
Jail Kenyan electoral commission officials, demands Odinga
The court further ordered Kenya's Independent Electoral and Boundaries Commission (IEBC) to conduct fresh polls within 60 days. The disputed 2007 election led to politically-motivated ethnic violence in which over 1,100 people were killed.
Kenyans on social media react to ruling annulling polls
It said these issues would be elaborated on in the detailed judgment of the court, which is to be published within 21 days. Meanwhile the People's Development Party President, Abed Bwanika says Kenyatta's stand is a lesson to Africa's presidents.
Germany elections: Merkel leads Schulz in polls
Merkel argued that the cease of the accession talks with Turkey can only be decided in the concert of the European Union states. Merkel responded: "We had a very dramatic situation then.There are times in the life of a chancellor when she has to decide".
German opposition leaders fault Merkel-Schulz debate
At several points, Merkel was able to blunt Schulz's critiques by noting that his own party had supported her. Merkel, leading the conservative Christian Democratic Union (CDU) party, is seeking a fourth term in office.