Macedonia's parliament has approved a constitutional amendment that renames the country the Republic of North Macedonia.



Eighty-one deputies in the 120-seat parliament voted in favor, securing the required two-thirds majority. Representatives of the opposition VMRO-DPMNE boycotted the vote that took place on January 11.



The name change will help resolve a decades-long dispute with neighboring Greece -- opening the way for Skopje to join NATO and the European Union.



At the start of the parliamentary session, Prime Minister Zoran Zaev told lawmakers the name change would "open the doors to the future, Macedonia's European future.”



Several hundred people have protested against the deal in front of parliament over the past three days.



The vote came after three days of negotiations between Zaev and lawmakers that opposed the change.



Zaev's governing coalition needed opposition backing to get the required number of votes and had said on January 10 that it was struggling to achieve that after a small ethnic Albanian party raised last-minute objections.



Talks between government and opposition lawmakers continued for a second day on January 11 following repeated delays in the vote.



The governments of Macedonia and Greece both struggled to secure the political support required to ratify the agreement reached last June in the border region of Prespes.



Opponents to the proposal say they are defending Macedonia's name, identity, and history, as well as the traditions of the Macedonian people, against what they call "the greatest national treachery."



Athens argues that use of the term “Macedonia” implies territorial claims on Greece’s northern province of the same name and on its ancient heritage.



For the deal to come into effect, Greece's parliament must now convene in the coming weeks to ratify it.

The office of Greek Prime Minister Alexis Tsipras said in a statement that "the prime minister congratulated Mr. Zaev on the successful conclusion of the process to revise the constitution of the former Yugoslav Republic of Macedonia."



Tsipras said earlier this week that Greece's parliament would also be asked to ratify the agreement by the end of the month.



"Within 10 days, in any case as soon as the [Macedonian parliamentary vote] result is notified to us and if we see that everything is in order, we will vote [to approve] the Prespes agreement," he told Open TV.



EU foreign-policy chief Federica Mogherini and Enlargement Commissioner Johannes Hahn welcomed the Macedonian parliament’s approval of the constitutional changes, describing it as “a crucial step in implementing the historic” deal with Greece.



"Political leaders and citizens alike have shown their determination to seize this unique and historic opportunity in solving one of the oldest disputes in the region, and decisively move forward on the European Union path," they said in a joint statement.



"The EU strongly supports this agreement which sets an example of reconciliation for the region and Europe as a whole," the statement said, adding that the EU was "awaiting the completion of the next steps leading to the full implementation" of the deal between Skopje and Athens.



German Chancellor Angela Merkel, who is on a working visit to Athens, has expressed strong support for the agreement.

With reporting by AP, Reuters, dpa, and AFP