The name change is aimed at ending a 27-year row between the two countries, because of which Greece had opposed its northern neighbor joining the European Union and North Atlantic Treaty Organisation.
It will still require ratification by national parliaments of both countries, and approval in a Macedonian referendum which is not assured.
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.
FYROM Prime Minister Zoran Zaev and Greek Prime Ministers Alexis Tsipras will witness the signing of the agreement by their foreign ministers on the borderlines, according to official announcements. The UN representative for the naming dispute, Matthew Nimetz and the European Commissioner for European Neighbourhood Policy and Enlargement Negotiations, Johannes Hahn, also attended the signing.
Specifically, by officially recognizing a Macedonian language and nationality, it is nearly certain that the country will be called Macedonia by the broader world, instead of North Macedonia, opponents of the deal argue.
Opponents include the conservative opposition party and the country's president Gjorge Ivanov, who has said he will not sign off on the agreement.
Zaev, elected last year, has made rapprochement with Greece a priority to secure his country's membership of the European Union and North Atlantic Treaty Organisation, blocked by Athens for years.
Macedonia was admitted to the United Nations in 1993 under the provisional name of the "Former Yugoslav Republic of Macedonia", but more than 120 countries including Russian Federation and the United States have recognized the Balkan country under the name of "Republic of Macedonia".
Police fired teargas on hundreds of people who gathered in front of the Greek parliament on Saturday to protest against the agreement.
"We have forces that are fighting for the future, we have forces that are fighting for the past", Dimitrov said in Skopje.
Later in the day, at least eight people were injured when Greek police used tear gas at protesters near the ceremony area, local media reported. The party is a vociferous critic of the name deal.
Greece's main opposition leader urged lawmakers Saturday to support his no-confidence vote against the government over a deal to end a decades-old dispute with neighboring Macedonia over the latter's name.
Greece also has a region called Macedonia.
The subject is an emotional one for many Greeks. The new name will make it clear that current Macedonia is not related to ancient Greece, allaying one of Athens' chief concerns.
"We are proud of today's agreement, may we stay as united forever as we are on this day", Zaev said.
Delhi kids gift fathers a day away from dad duties
Ideal gift for Father's Day: a new set of special skills - maybe a gift certificate for a cooking class or glassblowing. Since the 1960s, fathers have spent triple the amount of time with their children compared to previous generations.
How Arsenal Transfer News Affect Their Odds to Win?
Other players rumored to be destined for Arsenal include; Sokratis Papastathopoulos, from Borussia Dortmund, and Saul Niguez. If they are rumored to buy an elite player, during the transfer window, they play well which increases the odds of winning.