Hungary's Prime Minister Viktor Orban said that a referendum would be held to gauge domestic support for a controversial LGBTQ law, after the European Commission launched legal action against Budapest over the measure.

"Brussels has clearly attacked Hungary in recent weeks regarding the law", Mr Orban said in a video posted on his Facebook page.

The legislation, which includes a ban on the "depiction or promotion" of homosexuality and gender reassignment to under-18s, has drawn scorn across Europe.

It has been billed by Budapest as a way to protect children, but opponents argue that it conflates paedophilia with homosexuality and stigmatises the LGBTQ community.

The commission launched an infringement procedure against the bill, which came into force this month, saying it violates European Union rules on rights to freedom of expression, as well as free trade and provision of services.

Hungary swiftly hit back, accusing Brussels of interfering in domestic affairs said last week.

Hungary's Prime Minister Viktor Orban

European Commission President Ursula von der Leyen has called the bill a "disgrace" and said that the EU executive would use "all powers available" to force Hungary to repeal or modify the law.

An infringement procedure involves several steps and could drag out over years to ultimately go to the European Court of Justice, which could impose financial penalties.

Hungary has two months to respond to the arguments put forward by the commission before the procedure enters the next stage.

Budapest has also accused Brussels of holding off on its approval of Hungary's Covid recovery plan because of its opposition to the anti-LGBTQ law.