The FYROM (Macedonian) parliament has ratified a friendship treaty with neighboring Bulgaria aimed at ending years of feuding and boosting Macedonia’s bid to join the European Union.

Sixty-one lawmakers in the 120-member parliament backed the pact on January 15, with the main opposition party boycotting the session.

The conservative VMRO-DPMNE party opposed the ratification, saying the pact contained “serious faults” and failed to recognize the existence of a Macedonian ethnic minority in Bulgaria.

Lawmakers in Bulgaria, already a NATO and EU member, had already ratified the pact, which was signed in August.

The treaty recognizes both countries’ territorial integrity and calls for an “objective” reexamination of the common history of Bulgaria and Macedonia, a process that could lead to a review of school textbooks.

Under the accord, Bulgaria, a NATO and EU member, pledges to support Macedonia’s efforts to join both blocs.

Macedonia’s rocky relations with its bigger eastern neighbor have hampered its efforts to join NATO and the EU, although the two countries share close religious, historic, and linguistic ties.

Bulgaria still does not recognize the Macedonian language, which it views as a dialect of Bulgarian.

Both Skopje and Sofia hope the new treaty will help them set aside such differences.

The two countries said they would also improve economic ties, renounce territorial claims, and improve human and minority rights.

The friendship treaty is a “joint contribution to political stabilization between the two countries and in the region,” Macedonian Prime Minister Zoran Zaev said in Skopje after co-signing the pact with visiting Bulgarian counterpart Boyko Borisov.

“For the first time, without mediators or somebody telling us what to do, the two states came to a solution,” Borisov said. The treaty “shows the EU that the turbulent Balkans, which have passed through a lot of troubles, can solve problems by agreements without mediators,” he said.

“If you look back, you will stumble and fall,” Borisov said. “So we decided to look ahead. I am convinced that in 10 years the results will be visible.”

EU officials warmly greeted the agreement, which they described as “an inspiration for the whole region.”