The European Court of Justice will fine Hungary €1 million (£845,000) every day until it stops breaking EU law and takes in more migrants.
Hungary was guilty of “unprecedented and extremely serious infringement” of European laws on claiming asylum and deportations of illegal migrants”, the EU’s top court said.
Budapest was hit with a £169 million fine for breaking EU asylum law and warned there would be additional daily fines until it observes the rules.
Viktor Orban, Hungary’s long-serving anti-migrant prime minister, said that the “outrageous and unacceptable” fines were for “defending the borders of the European Union”.
He said: “It seems that illegal migrants are more important to the Brussels bureaucrats than their own European citizens.”
Mr Orban has regularly been at loggerheads with the EU over asylum policy since the migration crisis of 2015.
More than a million Syrians passed through Hungary during the crisis as the government erected border fences and introduced hard-line policies.
Hungary’s fenced southern border with Serbia remains a target for migrants hoping to reach EU territory through the Balkans from Turkey, before travelling to richer countries such as Germany.
In December 2020, the European court said that Hungary broke EU laws on granting asylum and deportation of illegal migrants.