Macedonia is facing a political crisis following an unexpectedly low turnout by voters in a historic referendum to rename the Balkan state.

Citizens were asked whether they endorsed a landmark deal struck with Greece, rechristening the state North Macedonia as a stepping stone to European Union and Nato membership.

But 30 minutes before polling stations closed it appeared that calls to boycott the vote had had an effect, with only 34.7%, or 623,000 people, casting a ballot.

Prime minister Zoran Zaev said he would recognise the democratic decision of those who had voted emphasising that the plebiscite was critical for the country’s western orientation, despite failing to secure the 50% turnout required to make the vote valid.

“No better agreement with Greece has been made or could be made and there is no other alternative than our country joining the EU. The referendum is decided by those who wanted to decide,” he told a raucous news conference.

The social democrat leader, who now has to confront the task of pushing the controversial accord through parliament, rejected the notion that the referendum had been unsuccessful because the outcome fell short of the threshold. With 98.04% of the vote counted, an overwhelming 91.49% voted in favour of the deal.

“I am determined to take Macedonia into the EU and Nato,” he said. “It is time to support European Macedonia.”

The Greek prime minister, Alexis Tsipras, had been in touch and saluted the result, Zaev revealed, although it was later described by officials in Athens as “contradictory”.

A spokeswoman for the US state department welcomed the outcome and said it could bring Macedonia economically and militarily closer to the west.

Zaev has staked his political future on placing the country in the western sphere. “Now the will of the people … must be transposed into political activity in the parliament,” he told reporters, insisting that if the deal wasn’t ratified by MPs he would resort to “that other democratic tool” and call early parliamentary elections.

Protesters gathered in front of Skopje’s communist-era parliament, where a podium had been erected draped in a banner declaring “the people boycotted a genocide. Never North, always Macedonia.”

“This is a bad day for Zaev and a wonderful day for Macedonians,” said Martin Dukovski, standing outside the building holding a large red and yellow Macedonian flag. “I am a proud Macedonian. The government has to take back this deal. It has to say ‘no’ to Greece.”

No poll has been as historic – or imbued with such sentiment – since the nation declared independence in 1991. The referendum was held against a backdrop of polarisation, potentially explosive emotion and Russia reportedly stepping up clandestine efforts to dash Macedonia’s embrace by the west. Working in unison with hardcore nationalists bent on boycotting the vote, Moscow has openly voiced distaste for the deal with Greece.

Until the accord’s announcement in June, Athens had vowed to block its neighbour’s accession to both the EU and Nato protesting that – without a geographical qualifier – the name amounted to appropriation of its own cultural heritage and territorial ambitions. Eager to end the row, the result was met with disappointment by officials in Athens.

Within the borders of landlocked Macedonia few issues have been as divisive. Many argue that with their country’s name also conveying a profound sense of identity, being asked to change it is tantamount to existential annihilation.

“My first name is Makedonska,” said a raven-haired hotel employee as she made her way to a polling station in a local school in central Skopje. “What are they [the Greeks] going to to do? Ask me to change that?”

Addressing the UN last week, the republic’s president, Gjorge Ivanov, described the referendum and the dilemma it posed as “historical suicide”. The former university professor had openly asked his fellow citizens to boycott the vote.

Although Zaev’s government had described the plebiscite as “consultative”, it had been accepted that a low turnout would make it almost impossible to push the name-change deal through the 120-seat parliament where support from at least 80 MPs is required if constitutional changes are to be ratified.

The nationalist main opposition VMRO-DPMNE party, which has denounced the deal – and is vehemently opposed to rewording the republic’s constitution – will now find it that much easier to resist ratification.

“The fact is that the name agreement did not get a green light, but a stop sign from the people,” said the party’s leader, Hristijan Mickoski. Earlier he had appealed to Macedonians to “listen to their hearts” when they woke up on Sunday.

The prospect of securing a majority turnout had been hampered by an electoral list dramatically trimmed by young people emigrating in search of work. Of the 1.8 million on the list, an estimated 600,000 are believed to have moved abroad.

Hopes had been pinned on a “yes” vote being clinched with the help of Macedonia’s large ethnic Albanian community which, at around 25%, is its biggest minority.

“We don’t have the emotional baggage of Slav Macedonians over the name issue,” said Petrit Sanagini, an ethnic Albanian, as he went to cast his ballot with his wife and baby daughter. “This is a compromise we feel we have to make to move our country forward towards a future of prosperity and security. It’s a historic day, a very special day. Our hope is that everyone will vote.”

More than 500 foreign observers monitored the plebiscite. In addition to EU and western officials the referendum had been watched closely in neighbouring Kosovo, where fierce opposition to the prospect of territorial adjustments with Serbia spurred thousands to take to the streets on Saturday. To the consternation of the multi-ethnic territory’s Albanian majority, Moscow has backed the idea of land swaps.

“We very much want Macedonians to accept this deal and join Nato,” said Albin Kurti, the opposition politician whose self-determination movement, Vetëvendosje, organised the protests. “It will deter Russian ambitions and interference in the region,” he told the Guardian in his Pristina office. “And that could not come at a better time.”