The refusal of Macedonia’s voters to endorse a change in their country’s name seems, at first glance, to be a matter of purely local interest. But the result of Sunday’s referendum will be widely seen as a significant victory for Vladimir Putin, a setback for the EU and Nato, and another disturbing example of Russia’s ability and willingness to influence the democratic process in western countries.

Western officials warned before the vote that Moscow was trying to depress turnout in the referendum in order to invalidate the outcome. In the event, more than 90% of those voting backed the name change.

But turnout was about 36%, short of the 50% required to make the decision binding on parliament. Zoran Zaev, Macedonia’s prime minister, has vowed to press ahead, but will face stiff opposition from nationalists.

Increased instability and division suit Russia’s game plan, according to western analysts. If the referendum had been successful, it would have resolved a dispute with Greece that has blocked Macedonia’s route to EU and Nato membership. As elsewhere in the western Balkans, notably Serbia, Kosovo and Montenegro, Moscow is determined to prevent further expansion of western influence.

For students of the 2016 US presidential election, Russia’s methods in Macedonia look highly familiar. Disinformation campaigns and “fake news”, cyberwarfare and hacking, phoney Facebook and Twitter accounts and secret cash payments – the modern equivalent of communist-era “red gold” – are all alleged to have been used.

Russia denies interfering. But western diplomats claimed last month that 40 new posts a day were appearing on Facebook encouraging a referendum boycott. Postings asked “are you going to let Albanians change your name?” – a blatant attempt to stoke tensions with majority-Slav Macedonia’s ethnic Albanian minority.

In one incident, football supporters opposed to the name change fought police in Skopje. Some later admitted they had been paid to cause trouble by shadowy figures. A photograph was circulated on social media showing the bruised face of a popular singer. It falsely claimed she had been beaten by police.

Zaev said at one point he had received numerous reports that Greek businessmen “sympathetic to the Russian cause” had paid rightwing nationalist groups as much as $21,000 (£16,000) to commit acts of violence. He was supported by James Mattis, the US defence secretary, who declared on a visit to Skopje that there was “no doubt they [Russia] have transferred money and are conducting broader influence campaigns”.

Mattis’s attempt to bolster the yes vote, backed by $8m in US congressional funding, were complemented by visits by Angela Merkel, Germany’s chancellor, Jens Stoltenberg, the Nato secretary general, and Federica Mogherini, the EU’s foreign policy chief. Britain’s Foreign Office reportedly provided referendum funds.

All sought to assure Macedonians their future security and prosperity were best served by closer integration with the west. But they were out-thought, outspent and outmanoeuvred by Moscow.

Mattis linked events in Macedonia to past Russian interference in votes in the US, the UK and Europe. “We do not want to see Russia doing [in Macedonia] what they have tried to do in so many other countries,” he said. Similarly, Stoltenberg said: “We have seen Russia trying to interfere in democratic political processes in this region for many years.”

Russia’s meddling extended to northern Greece, where four diplomats were expelled in July for trying to inflame anti-Macedonian sentiment in Thessaloniki. In 2016, Moscow was accused of trying to mount a coup in Montenegro to prevent it from joining Nato.

As elsewhere in Europe, Russia’s influence campaign in Macedonia exploited and complemented rightwing nationalist-populist narratives based on notions of identity, race and the perceived threat of an overbearing EU. And it remains unclear whether Moscow’s actions tipped the balance.

The paradox is that, whatever their country is called, a large majority of Macedonians support EU and Nato membership, according to a recent survey. That prospect has receded, at least for now. In the continuing Europe-wide contest for power and influence, Russia just scored again.