Hungarian Foreign Minister Anita Orbán says 10 Russian diplomats have been ordered to leave Budapest for taking part in "unacceptable" activities.

"This decision protects Hungary's security and sovereignty," she wrote on social media, without giving details.

Hungary was viewed as Russia's closest ally in the European Union under Viktor Orbán for years, but since his election defeat in April the new government has pivoted away from his pro-Kremlin stance.

The Hungarian foreign minister said the decision to expel the diplomats "does not imply breaking off diplomatic relations with Russia", but the foreign ministry spokeswoman in Moscow said "the response to the Russophobic lobby will be harsh and painful".

Hungarian Prime Minister Péter Magyar promised "pragmatic" relations with Moscow from the moment his Tisza party was elected in April. He and the foreign minister have both called on Russia to bring an end to the war in Ukraine.

In May Anita Orbán summoned the Russian ambassador to protest against a big drone attack on the Transcarpathia region of Ukraine that is home to a large Hungarian minority. Commentators have pointed out that her predecessor had not summoned the ambassador since the start of the Russian full-scale invasion in 2022.

Then last month Magyar formally broke with the previous Fidesz government's policies, with new guidelines spelling out that Russia's conduct in Ukraine "poses a threat to Hungary, Europe and the global order, and also puts the Hungarian minority living in Transcarpathia in serious danger".

Russia's Ambassador to Budapest, Evgeny Stanislavov, reacted bitterly to Anita Orbán's intention to continue "the necessary dialogue, based on mutual respect and adherence to the rules".

Hungary's next PM would pick up if Putin calls and tell him to stop Ukraine war

Budapest's promise of pragmatic co-operation was worth absolutely nothing, he complained, adding that Hungary's "extremely unfriendly step constitutes an unprecedented and ungrounded escalation".

Before Magyar was voted into office, Hungary had for years insisted on maintaining close relations with Moscow, partly citing cheap Russian oil imports. Viktor Orbán objected to the EU's supply of aid to Ukraine and repeatedly delayed packages of sanctions on Russia.

Ahead of the April elections, independent Russian investigative website Agentsvo reported that 15 of the 47 Russian embassy staff in Budapest were linked to Russian intelligence agencies and six more might be linked.

Former Hungarian foreign intelligence deputy head András Telkes told the BBC that even though "Russian spying activity" had been investigated before the election, the Fidesz government had prevented any action being taken.

The Russian embassy in Budapest had also rejected as false a report alleging that three Russian military intelligence officers had travelled to Budapest to influence the Hungarian vote.

Russia has routinely denied its embassies are used for espionage. However, hundreds of Russian diplomats have been expelled across Europe since 2022, and Russia has responded in kind.

Telkes told the BBC that the big question now was how Moscow would respond: "If 10 Hungarian diplomats were to be expelled from Moscow, in a tit-for-tat move, that would effectively close the Hungarian embassy there."