Macedonia’s parliament has ratified an agreement with Greece to change the former Yugoslav republic’s name at a plenary session that was boycotted by the main opposition party.

Lawmakers on June 20 voted 69-0 to ratify the agreement, which changes the country’s formal name to the Republic of North Macedonia.

The opposition nationalist VMRO-DPMNE party boycotted the session.

The draft legislation required a simple majority from the at least 61 deputies required for a quorum.

Ahead of the vote, Prime Minister Zoran Zaev defended the "historic" accord before the National Assembly, saying it represents a dignified and acceptable solution for both sides.

“We did not give up anything to anyone,” Zaev insisted.

Lawmakers on June 19 launched the process of ratifying the accord, as hundreds of protesters gathered in the center of Skopje for a third day to vent anger over the deal.

They voted 69-40 for the adoption of a shortened procedure, and two parliamentary committees later approved the draft law on ratifying the deal.

The agreement, signed by the two countries' foreign ministers on June 17, ends a 27-year dispute between Athens and Skopje and paves the way for Macedonia to begin membership talks with the European Union and NATO.

But it will take months to complete and faces several hurdles along the way, with President Gjorge Ivanov pledging to veto the deal.

That would force lawmakers to repeat the vote, and if the deal is ratified again – this time with an absolute majority -- then Ivanov will be unable to block it.

Ivanov on June 20 reiterated that his position on the "damaging agreement" remained the same "in spite of pressure."

"I urge Zaev to muster the two-thirds majority necessary to impeach the president, the same he will need to change the constitution [to incorporate the name change]," he also said in a statement.

Zaev has pledged to hold a referendum on the deal later this year. If Macedonians vote in favor, the next step will be for lawmakers to approve a constitutional amendment formally changing the country's name.

The Greek parliament would then vote on the deal, which has split the governing coalition and is rejected by most opposition parties.

The name dispute between Skopje and Athens dates back to 1991, when Macedonia peacefully broke away from Yugoslavia, declaring its independence under the name Republic of Macedonia.

Greece has objected to the name Macedonia, fearing territorial claims on its eponymous northern region.

Because of Greek objections, Macedonia was admitted to the UN under a provisional name, the Former Yugoslav Republic of Macedonia.

Greece, an EU and NATO member, has also cited the dispute to veto Macedonia's bid to join the two organizations.

With reporting by MIA and dpa