The European Union on Wednesday launched legal action against Hungary’s right-wing government over a new law that allows authorities to investigate and prosecute people accused of undermining the country’s sovereignty.

The “ sovereignty protection act ” took effect in December. It created a government authority with the power to gather information on any groups or individuals that benefit from foreign funding and influence public debate. Hungary’s secret services can assist in the authority’s investigations.