ATHENS — Greece’s left-led coalition government survived a no-confidence vote in Parliament Saturday brought over a deal to end a decades-old dispute with neighboring Macedonia concerning the latter’s name.
But the government suffered a loss in its parliamentary majority after lawmaker Dimitris Kammenos of the nationalist Independent Greeks, the government’s junior coalition partner, voted in favor. He was kicked out of the party immediately after the vote, leaving the governing coalition with a three-member majority.
Lawmakers voted 153-127 in the 300-member Parliament against the motion brought by the conservative main opposition party over the deal to rename the former Yugoslav republic North Macedonia. In the agreement, Athens would drop its objections to the country joining NATO and the European Union.
Thousands of protesters rallied outside Parliament during the debate, waving Greek flags and chanting antigovernment slogans. Scuffles broke out, with riot police firing tear gas to stop protesters from breaching police lines.
The deal reached by Greek Prime Minister Alexis Tsipras and his Macedonian counterpart Zoran Zaev on Tuesday aims to end a bitter dispute that has roiled the two countries’ relations since shortly after Macedonia declared independence from Yugoslavia in 1991.
Greece argued the term ‘‘Macedonia’’ implied territorial claims on its province of the same name.
The deal was met with fury by critics in both countries, who accuse their respective prime ministers of conceding too much.
‘‘Hatred toward the country of another is not patriotism,’’ Tsipras said during his speech in Parliament.
The agreement will be signed Sunday morning by the two nations’ foreign ministers at Lake Prespa near their common border. Both prime ministers will attend the ceremony, as will European officials. Protests have been called in both countries.
Speaking during the debate, Defense Minister and Independent Greeks head Panos Kammenos stressed that voting against the no-confidence motion was not a vote in favor of the Macedonia name deal, which he vowed to reject when it is eventually brought to Parliament.
Tsipras stressed the deal met all of Greece’s demands and would close ‘‘the open wound that has been troubling our country for more than 26 years.’’
Conservative New Democracy party leader Kyriakos Mitsotakis, who had brought the no-confidence motion, argued that a vote in favor of the government was a vote in favor of the name deal.
‘‘Today you are all mortgaging the future of the country,’’ he told lawmakers.
Across the border, Zaev has also met with opposition, with President Gjorge Ivanov saying he will not sign off on the agreement. Zaev has said he will put it to a referendum in the fall.
‘‘With the signing of the agreement between Macedonia and Greece, everyone will benefit,’’ Zaev said Saturday.
Macedonian Foreign Minister Nikola Dimitrov stressed the deal would pave the way for NATO and EU accession.
‘‘We have forces that are fighting for the future, we have forces that are fighting for the past,’’ Dimitrov said in Skopje. ‘‘We cannot change the past, we could the future.’’
The ratification process will take months.
In Macedonia, the agreement must clear the hurdles of parliamentary ratification, a referendum and a constitutional amendment. If Ivanov refuses to sign off on the deal, it will be sent back to Parliament for a second vote. If it passes again, the president must sign it.
In Greece, the deal faces ratification in parliament only after Macedonia has completed its part of the process.