1038 GMT February 21, 2019
Parliamentary Speaker Talad Xhaferi said 81 MPs had voted in favor of the name change in the 120-seat chamber, securing the required two-thirds majority, AFP reported.
But the name will also have to be approved by the Greek Parliament before it comes into effect.
The UN praised the democratic way Macedonia went about deciding to change its name, news.com.au reported.
A UN envoy, Matthew Nimetz, said on Saturday that the agreement paves the way for "a firmer basis for peace and security in the Balkans."
Ahead of the Macedonian vote, Prime Minister Zoran Zaev had emphasized the historic importance of the decision.
"Without the accord with Greece, there will be neither NATO nor EU" membership, Zaev said.
"I changed my opinion on the name issue in the name of progress and at the cost of my political career," he added.
Athens has promised to lift its veto on Skopje's attempts to join NATO and the European Union on condition Macedonia changes its name.
Greece has blocked the path to both international organizations since Macedonia broke away from the former Yugoslavia in 1991 because, it said, the name Macedonia should apply solely to its own northern province.
For the Greeks, Macedonia evokes national pride as the cradle of Alexander the Great's ancient empire.
Friday's vote brought an end to months of political bickering in Macedonia that included a controversial consultative referendum in September and a long parliamentary battle.
Officials of the main opposition conservative VMRO-DPMNE party, who refused to take part in the parliamentary debate, denounced the name change as treason.
However several opposition MPs broke ranks and voted for the change, alongside the ruling Social Democratic party and their junior coalition partners from the ethnic Albanian minority.
Zaev, who came to power in May 2017, will now look to Greek Prime Minister Alexis Tsipras to uphold his end of the deal, which was brokered last year.
"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' office said in a statement, after the vote.
Tsipras has said he sees the Macedonia deal as "one of his greatest legacies" as premier, second only to leading Greece out of the bailout era.
But he too has a fragile parliamentary majority, with 153 deputies in the 300-seat Greek Parliament.