Just days after a major showdown between the European Union and Hungary over aid to Ukraine, the European Commission on Wednesday announced it was opening a new disciplinary procedure against the Hungarian government over a recently passed piece of legislation that focuses on activities by foreigners deemed subversive.

The move comes on top of several other open disciplinary procedures against Hungary that the European Commission, the E.U. executive branch, has been pursuing against the government of the Hungarian prime minister, Viktor Orban.

Mr. Orban has long denounced the battles with Brussels, which he says pits a “woke globalist Goliath” against Hungary’s “David.” He has maintained that the European Union is out to punish him for pursuing a Christian conservative agenda, which he says is in line with the wishes of the Hungarian people.

The action by the commission centers on recently passed legislation in Hungary that seeks to punish interactions between Hungarian individuals or organizations, and foreigners or foreign groups that a newly created Office for the Defense of Sovereignty deems subversive.

In a statement on Wednesday, the European Commission said it had opened the infringement procedure after “a thorough assessment” of the Hungarian law.

The commission said that Hungary’s legislation “violates several provisions” of European law, including internal market rules, democratic values and electoral rights. It also said that the legislation went counter to fundamental rights such as the right to a fair trial and freedom of association.