The EU Commission had announced it will take legal action against Hungary due to the new law.

The Hungarian government will hold a referendum on a controversial anti-LGBT law in an attempt to fend off pressure from the EU and show that the majority of citizens are in favour of the legislation.

Hungarian Prime Minister Viktor Orbán has called on voters to back legislation outlawing the exposure of children to LGBT content in schools and from media outlets in a surprise referendum to take place after sustained criticism of the law from Brussels.

Orbán accused the EU of abusing its power by launching an infringement procedure against the legislation this week, which may see special funds withheld from Hungary.

“The future of our children is at stake, so we cannot cede ground in this issue,” Orbán said in a Facebook video.

“In the past weeks, Brussels has clearly attacked Hungary over its child protection law. Hungarian laws do not permit sexual propaganda in kindergartens, schools, on television and in advertisements.”

The referendum is to pose five questions concerning sexual orientation workshops in schools held without parental consent, content influencing children’s sexual orientation, and gender reassignment treatments for minors.

European Commission President Ursula von der Leyen has labelled the legislation a “disgrace”, claiming the law “uses the protection of children as an excuse to discriminate against people because of their sexual orientation.”

A recent referendum in Hungary saw a majority vote to close the country’s borders to immigrants fleeing the Middle East, and, with Orbán riding high in the polls, the government expect a majority will support the prime minister’s policies again.

The European Commission has not yet commented on today’s surprise announcement in Budapest, as Hungarians await a date for the upcoming vote.