0246 GMT May 24, 2019
The country will now be known as the Republic of North Macedonia, or Severna Makedonija in Macedonian, Sky News wrote.
Greece has argued since Macedonia's independence from Yugoslavia in 1991 that the young country's name implied a claim to the territory and ancient heritage of Greece's northern region of Macedonia — the birthplace of ancient warrior king Alexander the Great.
Previous administrations in Macedonia's capital, Skopje, resisted demands to change or modify the name.
The dispute strained relations between the two neighbors and the United Nations appointed a special envoy to mediate.
Greece will lift its objections to Macedonia's accession to NATO and the European Union once the dispute is resolved.
In Skopje, the opposition party VMRO-DPMNE, said Macedonian Prime Minister Zoran Zaev had informed party leader Hristijan Mickoski that he had "achieved a solution with Greece".
Greece's Prime Minister Alexis Tsipras said a deal had been reached that would give Macedonia a different name which would be used domestically and internationally.
He said: "We have a good agreement that covers all the preconditions the Greek side had set."
Bulgarian officials welcomed the agreement between Greece and Macedonia to resolve the dispute. But they warned that the deal should not be used for future territorial claims in the region.
Bulgaria's Foreign Ministry said in a statement that Macedonia's new name, Republic of Northern Macedonia, "opens the way for the European and Euro-Atlantic integration of our neighbor."
Bulgaria was one of the first countries to recognize Macedonia after its independence. But relations between Sofia and Skopje were strained for years over issues of identity, language and history.