SKOPJE (Reuters) - Macedonia’s parliament passed an amendment to the constitution on Friday to rename the country Republic of North Macedonia, in line with an agreement with Greece to put an end to a 27-year-old dispute.

Slideshow ( 13 images )

The countries struck the deal on the new name in June, but Macedonia will start using it only after the parliament in Athens also ratifies the agreement.

Eighty-one deputies in the 120-seat parliament voted in favor. Representatives of the opposition VMRO-DPMNE, who opposed the agreement with Greece, boycotted the vote.

“A new historical chapter in our statehood has been written this evening,” the Macedonian government said in a statement.

“It makes absolutely plausible two of our biggest state interests - membership in NATO and EU,” it said.

Greek prime minister Alexis Tsipras called his Macedonian counterpart Zoran Zaev to congratulate him, his office said in a written statement.

Greece blocked its neighbor’s aspirations to EU and NATO membership over the use of ‘Macedonia’, which it said implied territorial claims to a Greek province of the same name.

The implementation of the agreement, named after the bordering town of Prespa where it was signed, is intended to end the dispute.

NATO Secretary General Jens Stoltenberg and EU commissioner in charge of enlargement Johannes Hahn hailed the vote.

“NATO strongly supports the full implementation of the agreement, which is an important contribution to a stable and prosperous region,” Stoltenberg wrote on his twitter account.

“My sincerest congratulations to political actors and citizens of the hopefully soon to be North Macedonia on Parliament’s vote on the constitutional changes,” Hahn tweeted.

“(I) hope that this historic decision creates a positive dynamic for reconciliation in the whole Western Balkan region,” Hahn said.

Several hundred people have protested against the deal in front of parliament over the past three days. Macedonian opposition parties and nationalists say changing the name of the country and national symbols is too high price to pay for NATO accession.

The opposition VMRO-DPMNE party has asked for an early election.

“The vote on constitutional amendments that changed the name, identity, history and culture was done against the constitution. It was illegal, violent and done in a criminal way,” Hristijan Mickoski told journalists after the vote.