(Bloomberg) -- Armenia agreed to withdraw from several Azerbaijani border villages it has controlled since the early 1990s, a major step toward averting renewed hostilities between the two neighbors and reaching a long-elusive peace agreement.

Deputy prime ministers from the two countries, Shahin Mustafayev of Azerbaijan and Mher Grigoryan of Armenia, reached the agreement Friday during a meeting at the border, according to statements from both governments.

Armenia will give back “two and a half” villages in the northeastern section of its border border with Azerbaijan, Prime Minister Nikol Pashinyan’s office was quoted as saying by the pro-government Telegram channel Bagramyan 26. This will help “reduce risks connected with border demarcation and security,” the statement read.

Azerbaijan’s state news agency Azartac, citing the government, said Armenia will give back four villages in the same section of the border. 

The sides agreed to mark out the entire Azerbaijani-Armenian border based on the Alma-Ata Declaration of 1991, which committed newly independent former Soviet republics to recognizing their administrative borders that existed as of the end of 1991, according to the report.

Armenia and Azerbaijan have fought several wars over Nagorno-Karabakh, a region inside Azerbaijan that was once Armenian-majority and broke free of Baku’s control after the breakup of the Soviet Union in 1991. Armenians took over the mountainous region and seven surrounding Azerbaijani districts in a war in the early 1990s that killed 30,000 people and displaced more than a million. 

Azerbaijan took back most of the territory in a 44-day war in 2020 and regained full control of Nagorno-Karabakh in a lightening offensive in 2023 that resulted in an exodus of more than 100,000 of the region’s Armenian residents.

Control over the contested villages and mutual recognition of the two neighbors’ borders were among the major remaining issues keeping the two South Caucasus nations from reaching a permanent peace settlement.

Read more: Russia Pulls Troops From Karabakh Region After Armenians Fled

Russian peace-keepers, who were deployed in the region for five years after the 2020 war, this week started to withdraw ahead of schedule under an agreement reached by President Vladimir Putin and President Ilham Aliyev. Putin had sent almost 2,000 troops to the long-disputed region to maintain security as part of a truce he brokered in November 2020.

©2024 Bloomberg L.P.