Macedonia was spun into political crisis after a referendum on a deal that would have unlocked the door to Nato and EU membership fell well short of the required turnout, raising the prospect that the Balkan nation would be blocked from those Western clubs for years to come.

With most of the vote counted late Sunday, only 37 per cent of eligible Macedonians had answered the question of whether to accept an agreement to change the country’s name to North Macedonia in exchange for Greece’s lifting of its veto on Nato and European Union membership.

That was far short of the participation threshold of 50 per cent, even though 91 per cent of those who voted supported the deal.

The hotly contested campaign was closely watched by the Kremlin and Western leaders, who saw the vote as a signal for the geopolitical direction of the Balkans at a time when Russia and Nato nations are competing fiercely for influence in Europe.

The referendum was advisory, not binding, and Macedonian Prime Minister Zoran Zaev said he would press on with efforts to pass the constitutional changes necessary to live up to the agreement with Greece that was reached in June.

He said he would call snap elections as early as November if he failed to muster the two-thirds vote in parliament needed to implement the deal.

Despite the low turnout, the result was a “success for democracy and for a European Macedonia,” Zaev said.

The referendum offered a chance for the Macedonian public to weigh in on the deal with Greece, which has kept Skopje from being a full participant in Western institutions since it declared independence from Yugoslavia in 1991.

Greece, whose northern region is also called Macedonia, sees the country’s name as a political and territorial threat.

The Greek government said the referendum result was “contradictory” and that it respected the result even as it hoped the agreement could be preserved.

“The climate of nationalism and suspicion, of daily fake news and rampant fanaticism, unfortunately do not allow for a sober assessment” of the deal, the Greek Foreign Ministry said in a statement.

The name deal has inflamed nationalist passions inside Macedonia, where many opponents of the current government, including some who describe themselves as pro-Western, said the bargain was an unacceptable humiliation at Greece’s hands.

As often happens in referendums, the vote was also an unofficial plebiscite on Macedonia’s rulers. The country’s main opposition party, which lost power to Zaev last year, vehemently fought the renaming agreement, and its top leaders declared they would boycott the vote.

“The government has lost its legitimacy, and the only thing remaining is to respect the will of the people,” Hristijan Mickoski, leader of the main centre-right opposition party, VMRO-DPMNE, wrote on Facebook.

“Macedonia today voted against the agreement.”

Western leaders had poured into Skopje in recent weeks to push for a “yes” vote, in a measure of the stakes of the referendum.

US Defence Secretary James Mattis, German Chancellor Angela Merkel and Nato head Jens Stoltenberg were among the heavyweights who passed through.

Many of them described the deal as a once-in-a-generation chance for Macedonia to join the West. Nato leaders in July approved membership talks for as soon as the country implements the agreement.

The European Union urged all sides to respect the referendum result and Stoltenberg said on Twitter it was a “historic opportunity”, adding: “Nato’s door is open.”

Washington also welcomed the outcome, with the State Department urging lawmakers “to rise above partisan politics and seize this historic opportunity to secure a brighter future for the country as a full participant in Western institutions”.

Analysts said Macedonia had been targeted by a wave of disinformation, much of it with ties to Russia, with dozens of new websites offering false information about the content of the deal and the consequences of going along with it.

In July, a group of rowdy soccer fans said they had been paid to stir up violence at protests against the deal.

And Greece barred four Russian diplomats from the country for what leaders there said were efforts to foment nationalist opposition to Prime Minister Alexis Tsipras’ willingness to make a compromise with Skopje.