The European Union's top court has ruled that Hungarian anti-LGBTQ laws violate EU rules and infringe its values of equality and minority rights.


The laws were brought in by Viktor Orbán's government in 2021 and banned so-called promotion of homosexuality or gender change to under-18s, arguing it violated child protection laws.


The European Court of Justice ruled that the Orbán reforms breached EU rules on a number of levels, and significantly that it also broke the founding values of Article 2 of the EU Treaty - an unprecedented finding.


The ruling comes nine days after Hungarians voted to end Orbán's 16-year era of continuous rule.


The ECJ ruled that the Hungarian law interfered with rights such as a ban on discrimination based on sex and sexual orientation, respect for private and family life and freedom of expression and information.


The law also stigmatised and marginalised people who were transgender or not heterosexual and associated them with people convicted of paedophilia, the court found.


The Hungarian law was contrary to the very identity of the Union as a common legal order in a society in which pluralism prevails, it ruled.


John Morijn, professor of law and politics in international relations at the University of Groningen in the Netherlands, said the Court's ruling was historic in its symbolism, in that it meant the rights of a group in society could not be negotiated away.


You cannot equate what is totally natural - that 10% of the population loves the same sex - with egregious crime, he told the BBC.


Orbán's Fidesz party pushed through the legislation with a supermajority in parliament, aided by control of two-thirds of the legislature.


Last year, it passed a further amendment that enabled a ban on public events involving the LGBTQ community such as Budapest's popular Pride march, which went ahead despite the ban, prompting prosecutors to file charges against Mayor Gergely Karácsony.


The European Commission stated that the anti-LGBTQ law would be an issue to raise with the new government once it was in place.


Spokeswoman Paula Pinho remarked, It's up to the Hungarian government to abide by the ruling and once that is done the issue is solved.


The man whose Tisza party defeated Orbán on April 12, Péter Magyar, has not made specific comments regarding LGBTQ legislation but expressed a vision of Hungary where no one is stigmatised for differing views or loves.


Magyar has pledged to adopt a more pro-European approach in relations with the EU and his success in this area would include reversing the controversial laws.


Katja Štefanec Gärtner of the LGBTQ rights group Ilga-Europe urged that there is now no excuse for the European Commission not to require Hungary to quickly abolish its discriminatory law.


If Péter Magyar truly aims to be pro-EU, he must place this at the top of his agenda for his first 100 days in office, she said.


Prof Morijn argued that the ECJ's ruling could influence wider legal implications regarding other EU member states, stressing the gravity of Hungary's violations against EU law.


You are basically violating EU law in such a fundamental way... this is not just about the letter of the law but also the spirit of that law, laid down in Article 2, which lists all the values of pluralism, equality, and the rule of law, he noted.