Greece and Macedonia on Sunday signed a deal to resolve a decades-old dispute concerning Macedonia's name.
Under the agreement, Greece's northern neighbour will be renamed North Macedonia — a move the two countries' leaders said would be the beginning of closer, friendly relations and an example to all Balkan nations. The deal will also allow Macedonia to join Nato and the European Union.
The deal signed by the two countries' foreign ministers will be submitted for approval to the parliament in Skopje on Tuesday and to legislators in Athens after the Skopje government changes its constitution.
Greece's Prime Minister Alexis Tsipras and his Macedonian counterpart Zoran Zaev attended the signing ceremony at the Greek village of Psarades, on the shores of Prespa Lake, a site chosen because it is near where the borders of the two countries, as well as Albania, meet.
"This is our own appointment with history," Mr Tsipras said, and added that the Balkan peoples had long suffered from "the poison of chauvinism and the divisions of nationalist hatred".
Mr Zaev hailed an "end to decades of uncertainty" and said Greece and Macedonia would henceforth be "partners and allies", setting an example for the whole region.
Also at the ceremony was the UN mediator for the name dispute, Matthew Nimetz. He was joined by EU foreign affairs chief Federica Mogherini and EU Enlargement Commissioner Johannes Hahn.
Police cordoned off all approaches to Psarades to prevent protesters from reaching the site, so more than 4,000 Greek nationalists gathered near Pissoderi, a village 40 kilometres away. Several hundred marched to a nearby police blockade and began throwing rocks. Police responded with teargas and stun grenades.
Macedonian nationalists who also object to the agreement planned a rally in the city of Bitola, near the Greek border, on Sunday afternoon.
Since Macedonia left the former Yugoslavia in 1991, Greece objected to its use of the name "Macedonia" because it claimed that implied territorial designs on its own northern province of Macedonia.
Greek objections delayed UN recognition of Macedonia until April 1993, and then only as the Former Yugoslav Republic of Macedonia (FYROM). In 1995, the two countries signed an interim agreement after Macedonia agreed to modify its flag.