Greek Prime Minister Alexis Tsipras said that he had reached a "good agreement" with Skopje on the constitutional name of the Republic of Macedonia, adding that it satisfied all of Athens' preconditions.
Macedonia had proposed four names to resolve the dispute: Republic of North Macedonia, Republic of Upper Macedonia, Republic of Vardar Macedonia and Republic of Macedonia (Skopje).
Athens, which like all members of both organisations has a veto over admissions, objected to its neighbour's use of the name Macedonia, arguing that it, along with articles in the constitution, could imply territorial claims over its own northern region of the same name.
Tsipras and his Macedonian counterpart, Zoran Zaev, discussed the issue by phone on Tuesday.
The dispute between the two neighbours had been an obstacle to Macedonia joining either the North Atlantic Treaty Organisation military alliance or the European Union. Both were expected to issue public statements later in the day.
Officials had earlier told Reuters a deal over the name was imminent. One of the names under discussion was Northern Macedonia, diplomatic sources said.
Greek Prime Minister Alexis Tsipras shakes hands with Greek President Prokopis Pavlopoulos before briefing him on developments on the name dispute with Macedonia, in Athens, Greece May 19, 2018.
The agreement would be submitted for ratification to Greece's parliament only if Macedonia met its side of the deal, Tsipras said.