"Macedonia will be called the Republic of Northern Macedonia [Severna Makedonija]", Zoran Zaev, the country's prime minister, announced Tuesday.
Zoran Zaev, the prime minister of Macedonia, and Alexis Tsipras, the prime minister of Greece, both agreed to the deal on Monday.
He added that Macedonia "cannot and will not be able in the future to claim any connection with the ancient Greek civilisation of Macedonia".
European Union and North Atlantic Treaty Organisation officials have welcomed a deal between Greece and Macedonia resolving a decades-long dispute over the Balkan country's name.
"By solving the name question, we are becoming a member of North Atlantic Treaty Organisation".
Macedonia, the name of the ex-Yugoslav republic since its independence in 1991, has poisoned relations between Athens and Skopje for almost three decades.
"Our bid in the compromise is a defined and precise name, the name that is honourable and geographically precise - Republic of Northern Macedonia".
In a televised address, Tsipras said the 140 countries which had recognized the Balkan state simply as Macedonia would now recognize it as Republic of North Macedonia. Hundreds of thousands of people gathered in several major Greek cities, including Thessaloniki and Athens, calling for "Macedonia" to remain Greek.
"I now call on both countries to finalise the agreement reached by the two leaders".
Nato Secretary General Jens Stoltenberg added: "This historic agreement is testament to many years of patient diplomacy and to the willingness of these two leaders to solve a dispute which has affected the region for too long".
"In other words, if the constitutional amendment is not successfully completed, then the invitation to join North Atlantic Treaty Organisation will be automatically rescinded and the accession talks with the European Union will not start", he said.
However, Mr Tsipras said, this will be contingent on Macedonia completing the constitutional changes.
European Council President Donald Tusk tweeted his support for the agreement: 'Thanks to you the impossible is becoming possible'.
Veteran United Nations diplomat Matthew Nimetz, who has been a mediator in the name dispute since 1994, hailed the "leadership, vision and determination" of the foreign ministers of Greece and Macedonia, who have negotiated for months.
Greek PM Alexis Tsipras also confirmed that an agreement on the name has been reached. Athens say that name implies territorial claims on a northern Greek province of the same name.
The two prime ministers are expected to sign the agreement over the next weekend. "We just saw a press conference where the defeat is shown as a fake victory", Hristijan Mickoski, president of opposition party VMRO-DPMNE said.
Prime Minister Alexis Tsipras said Tuesday that a deal had been reached to give Macedonia a different name, addressing all of Greece's concerns.