Four Russian diplomats will be banned from Greece after evidence revealed Russia was trying to foment opposition to a historic deal between Greece and Macedonia that is likely to pave the way for Macedonia’s Nato membership and so weaken Russian influence in the western Balkans.

Greece said it would expel two Russian diplomats and ban two others.

Zoran Zaev, the Macedonian prime minister, speaking at the Nato summit in Brussels, indicated he knew Russia was behind some of the protests outside his own parliament, but he said his country was not going to seek conflict. “We are a small country. We want to build a friendship with everybody. There is no alternative but Nato membership,” he said.

He said countries, such as Bulgaria, managed to triple foreign direct investment after joining Nato, and he hoped it would deliver the same boost to his country.

Russia, involved in a wider struggle for influence with the EU across the region, has already been accused of backing a failed coup in Montenegro in 2016.

Russia said it would respond to the Greek expulsions by taking similar steps against Greek diplomats in Moscow.

The expulsion of the diplomats, revealed in the Greek media on Wednesday but relayed by the Greek government to Russia on 6 July, follows evidence they were encouraging rallies to oppose the Macedonian name deal, including offering bribes to opponents of the deal.

The historic naming deal, agreed on 17 June, will see the former Yugoslav Republic of Macedonia bow to Greek objections and change its name to Northern Macedonia. Greece had claimed the title Macedonia implied a territorial claim on the Greek province of the same name.

The Greek newspaper Kathimerini named the Imperial Orthodox Palestine Society, an organisation which promotes Russian ties to Christians in the Middle East, as being among the groups trying to fan Russian influence in Greece, including in the Greek Orthodox monastic community of Mount Athos.

A representative of the society denied it was involved in any alleged attempts to bribe senior Greek Orthodox clergymen, the Russian state Interfax news agency reported.

The Russian embassy in Athens.Photograph: Anadolu Agency/Getty Images

In 2008 Nato agreed to invite Macedonia to join the military alliance once its name dispute was settled, and Wednesday’s Nato summit meeting in Brussels will conclude with a formal invitation to join Nato.

The name has been disputed between the two countries ever since the break-up of the former Yugoslavia.

“We had issued warnings to Russian authorities for some time over [the actions of] these specific four diplomats and civilians, and on Friday it was officially raised, giving them a reasonable period of a few days to leave the country,” said a Greek government source.

The deal faces opposition in both Greece and in Macedonia, where a heated referendum is planned this autumn.

The Macedonian opposition is trying to block the establishment of an electoral commission required to prepare for the referendum. It is also accusing leading politicians in the Macedonian government of treason for agreeing to the deal.

Rejection of the deal inside Greece is, amongst others, coming from the seven MPs inside Independent Greeks (ANEL), the small rightwing nationalistic party in a governing coalition with the left wing Syriza, headed by Greece’s prime minister, Alexis Tsipras.

The name issue has led to splits inside ANEL, and Russian media has been promoting the idea of a new populist party led by Dimitris Kammenos, dedicated to blocking the name change.

Russia and Greece have until now maintained warm relations, with Athens one of the few countries that rejected a British request to expel diplomats in the wake of British claims of Russian involvement in the poisoning of the Russian spy Sergei Skripal and his daughter in Salisbury. But the Russian embassy in Athens has been previously accused of interfering in Greek politics following the leak of a tranche of emails in 2015.