Macedonia's prime minister and his Bulgarian counterpart signed a friendship treaty to end years of diplomatic wrangling and boost Macedonia's European integration.
Macedonia on Tuesday signed a deal to mend relations with neighbouring Bulgaria in a bid to speed up its NATO and European Union accession after a decade of setbacks.
The landlocked Balkan nation has attempted to join the EU since 2005 but its lingering dispute with Greece – whose northern province bears the same name as the former Yugoslav republic – has torpedoed Skopje's efforts.
The agreement signed on Tuesday by Macedonian and Bulgarian leaders represents a milestone in Skopje's foreign policy after its conservative VMRO-DPMNE party left office in December after 10 years in power.
According to the text, the deal means Bulgaria "will share its experience in order to help the Republic of Macedonia to meet all necessary criteria of EU membership and will support it for NATO membership."
The two countries said they would also improve economic ties, renounce territorial claims and improve human and minority rights. The two countries have also agreed to open a train line from Sofia to Skopje.
Macedonia, a small ex-Yugoslav republic of about two million people, gained independence from Belgrade in 1991. It avoided the bloody Balkan wars of the 1990s, but was rocked by an insurgency of its large ethnic Albanian minority in 2001.
Macedonian Prime Minister Zoran Zaev praised the "historic" deal and Bulgarian counterpart Boyko Borisov said it "shows to EU that turbulent Balkans, which has passed through a lot of troubles, could solve problems by agreements without mediators."
The accord was approved unanimously by Bulgarian lawmakers, supported even by nationalists who consider Macedonia part of the Bulgarian nation.
Relations between Skopje and Sofia have been strained for years.
Bulgaria considers the Macedonian language as a dialect of Bulgarian and speeches made by visiting Macedonian officials were routinely not translated.
However, since Zaev's first visit in June, Bulgaria is providing translation of his remarks as a sign of good will.
It also refuses to recognise its own Macedonian ethnic minority and Macedonian schoolchildren are still taught that their country was occupied by Nazi-ally Bulgarians during World War II.
Both Skopje and Sofia hope the new treaty will help them set aside such differences.
"(This is a) joint contribution to political stabilisation between the two countries and in the region," Zaev told reporters after the signing.
As part of the deal, a research team from both countries have agreed to examine the content of school textbooks.
The treaty also acknowledges the shared history of the two countries and their right to taking a different view of some topics.
"In politics and international law there is no such thing as the recognition of history ... Let historians deal with history," Daniel Smilov, an analyst with Bulgaria's Center for Liberal Strategies, said.