The EU on Wednesday said that it had launched action against Hungary after Budapest passed laws it says are intended to "protect Hungary's sovereignty" and curb foreign influence.

Critics say the laws are the latest bid by Prime Minister Viktor Orban's nationalist government to silence opponents ahead of crucial EU and Hungarian municipal elections in June.

The European Commission, the EU's executive arm, said it had sent a letter of formal notice to Hungary for violations of EU law.

The move is known in EU jargon as an infringement procedure. Hungary has two months to reply to the letter.

The move will likely further raise tensions between the European Union and Orban. Brussels already has placed a hold on 22 billion euros ($24 billion) in EU funds for Budapest over rule-of-law concerns.

Budapest regularly claims the European Union and other countries, especially the United States, back the opposition with funding to influence voters in Hungary.

Hungary's laws, passed last year, criminalise foreign funding of election campaigns and establish a new Sovereignty Protection Office with broad investigative powers.

Brussels considers that Hungary's step violates several elements of EU law, "in particular when it comes to the principle of democracy and the electoral rights of EU citizens," commission spokeswoman Anitta Hipper said.

"The set-up of a new authority with wide-ranging powers and a strict regime of monitoring, enforcement and sanctioning also risks to seriously harm the democracy in Hungary," Hipper said during a press conference in Brussels.

Orban's ruling Fidesz party has argued that the law will end "electoral trickery" after accusations against opposition parties that they received funds from a US-based NGO in the run-up to the 2022 elections.

Pan-European rights body the Council of Europe has urged Hungary to abandon the laws, arguing it posed a significant risk to human rights.

Rights groups, including Amnesty International, have also voiced alarm.

The United States said it was concerned the laws would be used to intimidate critics.

US State Department spokesman Matthew Miller said in December that the law was "inconsistent with our shared values of democracy, individual liberty and the rule of law".