The Hungarian Helsinki Committee, an advocate for asylum-seekers, urged Hungary to give refugees an opportunity to make their case for asylum.
Hungarian and Polish leaders, in particular, often describe Muslim refugees as potential security threats.
"Today's ruling shows that no country can hide from their responsibilities to refugees", Iverna McGowan, Director of Amnesty's European Institutions Office, said in a statement.
This is largely a result of a controversial deal the European Union signed with Turkey in March past year to send back migrants in return for billions of euros in aid and for admitting asylum seekers directly from refugee camps in Turkey.
But the Commission says "significant additional efforts" are needed to cut the asylum application backlog and improve processing in Greece so more people can be returned to Turkey.
But defiant rejection from some ex-communist states that the EU accuses of slipping on democratic standards - Hungary called the judgment a political "rape" of EU law - indicated no let-up in tensions that are testing the Union's internal cooperation.
In July, the EU Commission threatened the Czech Republic, Hungary and Poland with lawsuits for not implementing the relocation measures. 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.
In asking the court to annul the deal, Hungary and Slovakia argued at the Court of Justice that there were procedural mistakes, and that quotas were not a suitable response to the migrant crisis.
Slovakia is not included in the legal action.
Slovakian Prime Minister Robert Fico said, "we fully respect the verdict of the European Court of Justice", but added that his stance on the quotas "has not changed at all". Of those, 19,200 were transferred from Greece and 8,212 from Italy.
In March 2016, the European Union made a $7.1 billion deal with Turkey to have that country help alleviate the flow of migrants to European Union nations, making Turkey essentially a refugee buffer zone, as NPR's Lauren Frayer reported at the time.
Avramopoulos said the ECJ's decision is encouraging and that he hoped to reach a final compromise by the end of the year.
"Solidarity is not a one-way street", he said. "This decision jeopardises the security and future of all of Europe".
Under the emergency scheme, 120,000 relocations were due to take place over two years, ending in September 2017.
While Brussels expects previously non-compliant countries to accept refugees within weeks, Mr Szijjarto pre-empted a bitter stand-off by saying "all legal means" would be used to oppose the decision.
Did Lalu try to inflate rally turnout with doctored image?
Tyagi told this newspaper: "He ended his long association with the party by attending the rally organised by the RJD". Sharad Yadav's presence on stage, despite his party warning him to stay away, may invitestern action against him.
North Korea Launches Three Short-Range Missiles
South Korean President Moon Jae-in did not participate in the meeting and his office didn't immediately provide further details. The command had said earlier that the first and third missiles, fired early on Saturday, had "failed in flight".
US Missile Defense Test Hits and a Miss
The previous test in June involved the John Paul Jones firing SM-3 missiles at a ballistic target, and was not successful. Navy ship intercepted a medium-range ballistic missile in a test off Hawaii on Monday, according to the U.S.
Georgia QB Jacob Eason leaves season opener with knee injury
Georgia fans were already starting to grumble early with the offense stuck in neutral starting its third possession of the season. Satterfield is most impressed with Georgia and knows while the game is a welcome challenge; it's still a mighty one.