The Macedonian parliament has amended the constitution to rename the country as the Republic of Northern Macedonia.

Macedonian Prime Minister Zoran Zaev secured the required majority in parliament on Friday that was needed to rename the country in line with a landmark agreement with Greece to end a decades-long dispute.

Parliamentary speaker Talad Xhaferi said 81 MPs voted in favour of the name change in the 120-seat chamber, securing the required two-thirds majority.

A spokesperson for the governing Social Democrats said the ethnic Albanian legislators also agreed to back the deal.

Ethnic Albanians make up about a quarter of Macedonia's 2.1 million people.

Albania has congratulated Macedonia's parliament vote on name change as "a clear demonstration of statesmanship unlocking NATO and EU path".

Albanian Foreign Minister Ditmir Bushati tweeted after the vote, saying "the contribution of Albanian political parties once again proved to be a decisive factor".

The final vote of #PrespaAgreement by 🇲🇰 Parliament is a clear demonstration of statesmanship unlocking #NATO and #EU path. The contribution of Albanian political parties once again proved to be a decisive factor. Congratulations! — Ditmir Bushati (@ditmirbushati) January 11, 2019

'An act of treason'

Delays had marked the October vote that launched the procedure to change the constitution, also with a two-thirds majority.

The deal encountered strong opposition from both sides of the border, with critics saying it offered too many concessions to the other side.

Representatives of the conservative opposition VMRO-DPMNE boycotted the vote.

The party's leader Hristjan Mickoski accused the government of securing parliamentary approval by "blackmailing" MPs and urged Zaev to call an early election this spring.

Mickoski told reporters the move to appease Greece was made against the desires of the Macedonian people "and is an act of treason".

Over the past three days, several hundred people protested against the deal in front of parliament.

Zaev agreed on the name change with Greek counterpart and fellow leftist Alexis Tsipras in June.

Under the agreement, after Skopje cements the name change with constitutional amendments, Tsipras is to push the ratification of the agreement through Greek parliament.

Greece is bound by terms of the deal to stop blocking Macedonia from NATOand other international groups and to allow it to start European Union accession talks as part of the deal. The so-called Prespa agreement seeks to end a 27-year-long dispute between Athens and Skopje over the name Macedonia.

The Greeks have accused their northern neighbours of intent to steal the identity and even territory from their own ancient province with that name, which Macedonia has denied.

Macedonian approval of the name change does not end the issue though.

The Greek government is struggling to hold up its end of the bargain, and is struggling to secure the political support required to ratify the agreement reached last June.

Greek Prime Minister Tsipras has said he wants to bring the deal - which has brought his coalition government to the brink of a breakup - to parliament in coming weeks.

Although his junior coalition partner opposes the deal, Tsipras has voiced confidence he will be able to secure ratification with the backing of opposition legislators.