BUDAPEST, Sept 12 (Reuters) - Hungary's government will change legislation passed in 2020 by Viktor Orban's former government that had effectively banned ‌gay adoption, Prime Minister Peter Magyar said on Saturday.

Adoption in ‌Hungary, a European Union member state, by gay and lesbian couples was possible until ​late 2020 if one partner applied as a single person.

Under the law passed by Orban's right-wing Fidesz party in 2020, single people had to have their adoption requests approved by the family affairs minister, which has amounted ‌to an effective ban.

Magyar ⁠ousted Orban after 16 years in a landslide election win in April. Changing the system of adoption would be ⁠a significant measure to restore LGBTQ rights.

"We can state unequivocally that we will change this system: it should not be the minister, a politician ... who ​makes the ​decision in such cases, but rather ​professionals capable of determining the ‌conditions under which a given young child can achieve ... a life that allows them to become a happy and harmonious member of society," Magyar told a briefing, in reply to a question.

Orban, who cast himself as a defender of what he called Christian values from Western liberalism, ‌passed laws ending the change of gender ​in personal documents, effectively halting adoption by ​same-sex couples and banning materials ​in schools seen as promoting homosexuality or gender transition.

The ‌erosion of LGBTQ+ rights had a ​traumatic effect on ​the community.

Orban's government violated European law with rules prohibiting or restricting access to LGBTQ content, which stigmatise and marginalise gay and trans ​people, the European Court ‌of Justice ruled in April, just before the election.

Hungary has ​never allowed gay marriage but still recognises civil unions.

(Reporting by ​Krisztina Than, Editing by Louise Heavens)