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. REUTERS/Costas Baltas

ATHENS (Reuters) - Greece and Macedonia have reached an agreement on how to end their long-running name dispute, a Greek government official said on Tuesday.

Greek Prime Minister Alexis Tsipras was briefing President Prokopis Pavlopoulos on Tuesday afternoon. Tsipras was widely expected to give a state address later in the day.

Officials had earlier told Reuters a deal over the name was imminent. The decades-old dispute between the two neighbors had been an obstacle to Macedonia joining either the NATO military alliance or the European Union.