ATHENS, Greece — Over 5,000 people demonstrated in Greece's second-largest city against a deal with Macedonia that seeks to end nearly 27 years of disagreement between the two countries over Macedonia's name.

The protesters marched toward the Macedonian consulate in Thessaloniki and then the offices of the two partners in Greece's coalition government, Syriza and the Independent Greeks, on Sunday.

Outside the party offices, protesters threw bottles and chairs. Police responded with tear gas and stun grenades to beat back the crowd. No injuries were reported and police say there were no arrests.

Nationalists in both countries oppose the deal that would rename Greece's neighbor North Macedonia and allow the Greek province of Macedonia to still use that name.

In return, Greece would withdraw its objections to the country joining NATO and the European Union.