(Bloomberg) -- The Republic of Macedonia took a big step toward starting talks to join the European Union and NATO, with parliament ratifying a deal to end a decades-long name dispute with Greece that has ratcheted up political tension on both sides of the border.

Lawmakers backing Prime Minister Zoran Zaev’s government on Wednesday approved an agreement signed with Greek Premier Alexis Tsipras, under which the former Yugoslav state will change its name to the Republic of North Macedonia. The country’s opposition boycotted the vote, and Zaev said his cabinet may seek to impeach President Gjorge Ivanov -- an ally of the anti-government VMRO-DPMNE party -- if he makes good on a pledge to veto the legislation.

Zaev is planning a referendum in the fall to muster public support for a constitutional change that it has offered in exchange for Greece to stop blocking the country’s aspirations of joining the EU and the North Atlantic Treaty Organization. If the constitutional hurdle is cleared, it would clear a major obstacle for the country to joining the euro-Atlantic structures that have helped lift living standards in former communist countries from the Baltic to the Black Sea.

“If we need to, we’ll widen the majority exclusively for the impeachment of the president,” Zaev told Channel 5 late Tuesday. “We’ll do everything possible to remove any obstacles before the citizens, who have to have their say.”

Zaev’s government is hoping to receive a date to start accession talks with the EU as early as next week, and an invitation to join NATO in July. The landlocked country of 2 million has been blocked from negotiations with both organizations by Greece, which believes the name ‘Macedonia’ is a territorial claim over its northern province with the same label.

For his part, Tsipras survived an opposition-led no-confidence vote on Saturday, even though his main coalition partner, the Independent Greeks party, has repeatedly said it won’t vote to ratify the agreement when it’s submitted to parliament because it opposes its neighbor using "Macedonia" in its name. The accord between the two countries has triggered protests in both Greece and the Republic of Macedonia.

President’s Veto

In Skopje, Ivanov’s veto may be overturned by a majority of all 120 lawmakers in parliament. Zaev has 68 of the assembly’s 120 seats, but will need the support of at least 80 to start an impeachment procedure. The president is backed by the opposition VMRO-DPMNE party’s 48 mandates. A final decision over the head of state’s dismissal is taken by the Constitutional Court.

The president, who survived a similar impeachment attempt two years ago, didn’t budge in the face of the challenge.

“My decision with regard to the harmful accord is final and remains unchanged despite all threats and pressures,” Ivanov said Wednesday in an emailed statement.

To contact the reporter on this story: Slav Okov in Sofia at sokov@bloomberg.net

To contact the editors responsible for this story: Balazs Penz at bpenz@bloomberg.net, Michael Winfrey, Andras Gergely

©2018 Bloomberg L.P.