The European Court of Justice (ECJ) has ruled that a law passed by the Hungarian government to make foreign donations to NGOs more transparent is against European Union laws.

The ruling against the transparency law comes after the case was brought to the court by the European Commission after it had initially begun proceedings against Hungary.

The NGO law, which was passed in 2017, required NGOs that took 20,500 euros or more a year from overseas to register all foreign donations above 1,500 euros with the government, which shared the information online in order to make foreign funding of so-called “civil society” groups more transparent.

According to the ECJ, the NGO law is discriminatory and unjustifiably restricts both the NGOs and those who donate to them. The court cited the EU principle of the Free Movement of Capital as well as claiming the NGO law violated privacy and the right to respect for private life, Die Welt reports.

The law was largely seen to be aimed at the network of NGOs that receive funding from left-liberal Hungarian-American billionaire George Soros, who Prime Minister Viktor Orban has repeatedly criticised, saying he wishes to flood Europe with millions of illegal migrants.

The Civil Liberties Union for Europe welcomed the judgement against Hungary, saying that the ruling was a “success” and claiming the law was passed in order to limit debate and attack the finances of groups critical of the government.

The Hungarian government reacted to the ECJ ruling by stating that while the court objected to some of the methods used by the government, its ruling also stated “that the objectives relied upon by Hungary, consisting in increasing the transparency of the financing of civil society organizations, […] are in principle legitimate.”

“All of this effectively illustrates that while the EU’s top court might not agree with the specific rules we’ve put in place, it did support the driving principle behind Hungary’s transparency law,” Hungarian government spokesman Zoltan Kovacs wrote.

Follow Chris Tomlinson on Twitter at @TomlinsonCJ or email at ctomlinson(at)breitbart.com