Europe's top court has ruled that Hungary broke EU law when education rules forced a university in Budapest to shift most activity abroad.
The 2017 law focused on foreign universities but singled out the Central European University (CEU) founded by George Soros.
The European Court of Justice said that conditions imposed by Viktor Orban's government were incompatible with EU law.
Only a skeleton CEU staff remains.
The central Budapest campus is now largely empty, after the law forced the university to move more than 90% of its teaching to a brand new campus in Vienna at a cost of €200m (£180m).
What is CEU and why is it important?
The CEU was set up in 1991 in Budapest as a mainly graduate university by Mr Soros, the Hungarian-American philanthropist and investor.
It has a dual legal identity, registered in both New York State and Hungary. It currently has 1,243 students from 90 countries.
In 2019-20 it moved to Vienna after the Hungarian government made its continued functioning in Budapest impossible with its "Lex-CEU".
Most of the university's degree programmes are accredited in the US. The attack on CEU was widely interpreted as a battle between Hungary's nationalist prime minister and the liberal-minded Mr Soros.
What was controversial about the Orban law?
The law was part of a reform of Higher Education by the Fidesz government led by Viktor Orban.
It targeted the dual legal identity of CEU.
It demanded that foreign universities must have a "parent" university in their country of origin. Other elements of the ongoing reform are:
- Privatisation of 13 state universities
- These are placed in the hands of boards of governors, appointed by the government.
- Research institutes formerly under the Academy of Sciences are now under the control of the Ministry of Innovation
How have the government and university reacted?
CEU Rector Michael Ignatieff welcomed the ruling as a moral and legal vindication.
"The ruling lifts the whole burden of Lex-CEU off our backs and restores our freedom," he told the BBC. "It also strengthens academic freedom throughout Europe."
Hungarian Minister of Justice Judit Varga said: "Hungary will implement the judgement… in line with the interests of Hungarians." She added there was "no need for 'mailbox universities'".
Her response prompted Mr Ignatieff to say that her "comment does not make legal sense".
What happens now?
The university has said it will stay in Vienna but it does still run two courses in Budapest and has one of the city's best libraries. George Soros said the European Court ruling was a "victory for the fundamental values of the European Union" but one that came too late for CEU.
From September 2021, new US-accredited courses could start in Budapest, but no decision has yet been taken.
It is unclear what the Orban government will do. Earlier this year it signed an agreement with the Shanghai-based Fudan University to set up a new campus in Budapest.