Greek police fired teargas at protesters outside parliament on Saturday as lawmakers were in session discussing a no-confidence motion against the government over a controversial name deal with neighbouring Macedonia.

Police fire at least two rounds of teargas at individuals who tried to scale stairs outside parliament in central Athens, angered by the accord between the two countries.

Greece and Macedonia have taken a major step towards resolving a 27-year-old dispute over the latter's name by signing an agreement that would see Macedonia change its name to the Republic of Northern Macedonia.

Greek Foreign Minister Nikos Kotzias and Nikola Dimitrov of Macedonia signed the historic accord, with Prime Ministers Alexis Tsipras and Zoran Zaev in attendance, joined by officials from the United Nations and the European Union (EU), who have welcomed the move.

“Traitors, traitors,” up to 5,000 protesters gathered in the central Syntagma square chanted.

Athens and Skopje agreed this week to end a decades-old dispute over the name of the Balkan country, which it shares with a northern Greek province. Under the deal, the former Yugoslav state will be known in future as “North Macedonia”.

The agreement has triggered a storm of protest in both countries. In Athens, opposition parties filed a motion of no confidence in the government of Prime Minister Alexis Tsipras, angered at what they describe as a national sellout.

A vote on the motion is expected later on Saturday.

“I’m furious. That person (Tsipras) is not working in the national interests or the national sentiment of Greeks,” said demonstrator Sophia Constantinidou, 45.

The name dispute has soured relations between the two neighbors at least since 1991, when Macedonia broke away from former Yugoslavia, declaring its independence under the name Republic of Macedonia.

Many Greeks see the name issue as an attempt by Skopje to hijack Greece’s ancient cultural heritage. Once the deal is ratified, Greece has said it will support the opening of negotiations for North Macedonia to join the European Union and NATO.