ATHENS — Tens of thousands of people gathered in Greece’s second city, Thessaloniki, on Sunday to protest the inclusion of the word “Macedonia” in the name of the neighboring former Yugoslav republic amid talks by the two nations to resolve the longstanding dispute.

Drawing what the police estimated at 90,000 people, the rally was the first major protest since Greece and the Republic of Macedonia agreed to join United Nations-mediated talks this month to settle the 25-year disagreement. Organizers say further rallies are planned.

Many Greeks argue that the name Macedonia implies a territorial claim to a region in the north of Greece with the same name; Thessaloniki is its capital.

Greece has blocked attempts by Macedonia to join NATO and the European Union. NATO’s secretary general, Jens Stoltenberg, told officials last week in Skopje, the Republic of Macedonia’s capital, that the name dispute with Greece must be resolved before the Balkan country can join the alliance.