Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Hundreds of thousands of Greeks rallied on Sunday in protest at any use of "Macedonia" in resolving the 25-year-old dispute between Athens and Skopje over the neighboring ex-Yugoslav republic's name.

Greece says the name Macedonia implies a territorial claim over its own northern region of that name. The two countries agreed earlier this month to renew efforts to settle the row, which has blocked the republic's attempts to join NATO and the European Union. Both countries say they hope to reach an accord by June.

Witnesses said about 300,000 people gathered Sunday in Thessaloniki, the largest city in Greece's Macedonia, in one of the country's biggest protests in recent years.

Related: Greece is forcing this country to change its name

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

They waved Greek flags, held banners reading "There is only one Macedonia and it is Greek!" and chanted the national anthem as they rallied around the statue of Alexander the Great in the center of the city and along its seaside promenade and port.

Greece has agreed that, until the dispute is formally resolved, the republic can be referred to internationally as "FYROM" — Former Yugoslav Republic of Macedonia. That is the name under which it was admitted to the United Nations in 1993.

Macedonia declared independence in 1991, avoiding the violence that accompanied much of the breakup of Yugoslavia. Prime Minister Zoran Zaev, who took power last May, pledged to accelerate the country's bid to join the E.U. and NATO and to work on resolving the name dispute.

A protester in the northern Greek city of Thessaloniki on Sunday. ALEXANDROS AVRAMIDIS / Reuters

Talks last week that were mediated by United Nations' diplomat Matthew Nimetz, did not produce concrete results but some name suggestions were put forward for negotiation, according to local media.

Settling the issue would be hailed as a success by Greek Prime Minister Alexis Tsipras, whose left-right coalition first came to power in 2015. So far, the issue has strained relations with his coalition ally, the right-wing Independent Greeks party which objects to the use of Macedonia in any agreed name.

"It's totally groundless historically and absurd to seek the exclusivity of Macedonia," Tsipras told Ethnos newspaper.

"But it is not unreasonable to have the term 'Macedonia' included in a compound name, with either a geographical or a chronological qualifier, for all uses, to make absolutely clear that nobody claims other people's land or history."

A map showing the cities of Skopje and Athens. Google Maps

A poll last week showed that a majority of Greeks do not want "Macedonia" used in any solution.

"We won't surrender the name Macedonia no matter if the rest of the planet surrenders it," one of the protest organizers told a cheering crowd.