Greece is poised to embark on the final stage of ratifying an accord that will lead to neighbouring Macedonia changing its name after the prime minister, Alexis Tsipras, narrowly survived a confidence vote in parliament.

The agreement, which ends almost three decades of dispute between the two countries, will be put to vote by MPs next week.

“It will submitted to parliament probably on Monday,” Costas Douzinas, who heads the Greek parliament’s defence and foreign relations committee, told the Guardian. “It will be debated at committee level first and then put to the chamber for vote.”

The accord, reached in June last year, has received abundant praise from European leaders who view it as a rare diplomatic victory that will help shore up security in the volatile western Balkans. On Wednesday the former Yugoslav republic gave Athens formal notice that it had fulfilled its side of the deal and amended its constitution to reflect its new name of North Macedonia.

Under the terms of the agreement, it now falls to the 300-seat Athens parliament to give its approval.

Greece has previously vetoed Macedonia’s membership of Nato and the EU, arguing that the predominantly Slavic nation’s name amounted to cultural appropriation of its ancient history and conveyed territorial ambitions towards its own province of Macedonia.

With Tsipras keen to cement his legacy as the politician who dared to solve the dispute, his office vowed on Thursday that it would ensure “every last Greek citizen” was informed in detail about the treaty.

Result of Macedonia's referendum is another victory for Russia | Simon Tisdall Read more

In a statement released after mustering the support of 151 MPs to scrape through the confidence motion – a win that permits him to remain in power until his term ends in October – the leftist leader challenged his conservative rival Kyriakos Mitsotakis, who has stepped up opposition to the deal, to a televised debate on the issue.

With Macedonia having made the requisite changes, Tsipras pledged that the full text of the agreement would be disseminated through the media on Sunday to allow Greeks to make an informed choice as to whether the agreement “is for or against our national interests”.

The statement said: “Our aim is for the Greek people to learn the truth and to judge with logic and sensitivity … and not on the basis of argument, slogans and nationalist slurs.”

But hostility is immense. In the four days since Tsipras called the confidence vote after his coalition partner, the nationalist Independent Greeks party, pulled out of the government in protest at the deal, debate has turned increasingly ugly.

Cries of treachery have become ever louder with MPs receiving death threats for suggesting they might vote in favour of the legislation. In northern Greece, abutting the former Yugoslav republic, posters have appeared with the faces of parliamentarians and the words: “You will betray our Macedonia.”

A poll carried by the Protothema news site suggested 69% of Greeks were against the accord.

Dissident lawmakers who made it possible for Tsipras to win Wednesday’s late-night vote are not all as willing to support the government on the name change.

Analysts say much will depend on the stance of the centrist Potami party, which has previously declared it “a national duty” to back the agreement. In recent days as anger has mounted, it too has wavered.

Douzinas, an MP with the ruling Syriza party, expressed confidence that the accord would pass even if nationalist rhetoric was likely to be ratcheted up further. “But I am worried that as parties compete to be seen as patriotic, the debate will become increasingly ugly,” he said. “I find it extremely shocking that while the main opposition party had agreed to a compound name that would include Macedonia, it is now against that altogether.”

On Thursday opponents announced they would wage “the biggest battle yet” against the deal by staging a massive demonstration outside parliament on Sunday. “All of us should assume our responsibility towards history,” said organisers, who have described the accord as an affront to Alexander the Great, the warrior king regarded as the greatest Macedonian of all time.

Piling the pressure on Tsipras’s government, the all-male monastic republic of Mount Athos, in north-east Greece, called for a referendum to be held on the issue before the agreement was brought to parliament for ratification. A plebiscite would “respect the will of the Greek people”, the religious community declared, saying monks would be dispatched to attend Sunday’s demonstration.

Protesters have confessed to being emboldened by Vladimir Putin’s publicised disdain for a deal that Moscow argues is aimed at expanding Nato’s reach into the western Balkans. Athens has promised to drop its objections to Skopje acceding to the military alliance once the agreement passes into law.