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, Radio Free Europe / Radio Liberty (RFE/RL) reported.
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.
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 coming weeks to ratify it.