KIEV/BUDAPEST (Reuters) - Ukraine and Hungary announced tit-for-tat expulsions of each other’s diplomats on Thursday, the latest in a series of spats between the neighbors that threatens to set back Kiev’s aspirations for European Union and NATO membership.

Ukraine said it had given a Hungarian consul 72 hours to leave the country after accusing his consulate of illegally issuing passports to members of an ethnic Hungarian minority in Ukraine. Ukraine’s constitution bars Ukrainians from holding citizenship of other countries.

Kiev accused the consul, who is based in the western town of Berehove near the Hungarian border, of “activities incompatible with the status of a consular officer”.

Hungary in turn expelled a Ukrainian consul in Budapest and reiterated a threat to block Ukraine’s EU and NATO integration.

Ukraine has sought greater integration with Europe since the ouster of a Moscow-backed president by mass protests in 2014 and the subsequent outbreak of a pro-Russian separatist insurgency in eastern regions that has killed more than 10,000 people.

“We hope that the Hungarian side will refrain from any unfriendly steps toward Ukraine in the future, and that its officials will not violate Ukrainian legislation,” Ukraine’s foreign ministry said in a statement.

Hungarian Foreign Minister Peter Szijjarto accused Ukraine of pursuing “an extreme campaign which incites hatred against Transcarpathian Hungarians” and denied that its consul had broken the law.

He also criticized Ukraine’s decision to conduct military exercises near the Hungarian border. The head of Ukraine’s armed forces, in a Reuters interview on Saturday, denied the exercises were hostile to Hungary.

“If a country aspiring for NATO membership settles military forces to the border of NATO, it cannot join NATO, and if it launches an attack against dual citizenship, an established EU institution, it cannot join the EU either,” Szijjarto said.

“As long as Ukraine does not meet its obligations undertaken to NATO and the EU, we will veto every attempt aimed to bring Ukraine closer to these two integrations.”

Ukraine’s Foreign Minister Pavlo Klimkin had warned in a Facebook post on Wednesday that “the events around the distribution of Hungarian citizenship in Berehove, let’s say, do not add joy.”

Szijjarto also repeated criticism of Ukraine’s move to oblige teachers to use only Ukrainian in secondary schools, which he previously said had driven bilateral relations to their lowest point since the fall of the Soviet Union.

Szijjarto met his Russian counterpart Sergei Lavrov for talks in Moscow on Wednesday. Asked on Thursday whether blocking Ukraine’s aspirations for western integration was playing into Russia’s hands, he said:

“I would like to stress once more that I don’t care what Russians think about the politics that we pursue regarding Ukraine.”

“What I care about is 150,000 Hungarian people who must be defended because their daily lives, their minority rights are visibly in danger,” he added.