The two sides clashed repeatedly over the border around the Kyrgyz town of Batken in 2021 and 2022, culminating in a six-day conflict in September 2022.
The deal, signed by Kyrgyz President Sadyr Japarov and his Tajik counterpart Emomali Rakhmon in Kyrgyzstan's capital Bishkek, also provided for the reopening of road, rail and air transport links between the two that had been suspended since the battles of September 2022.
Disputes over the two countries' 970 km (600 mile) shared border date from Soviet times, when Moscow first drew up frontiers in ethnically mixed parts of Central Asia.
Kyrgyzstan and Tajikistan both host Russian military bases and maintain warm relations with Russia, where many of their nationals migrate for employment.
(Reporting by Aigerim Turgunbayeva in Bishkek and Mariya Gordeyeva in Almaty, Writing by Felix Light; Editing by Mark Trevelyan)

A Kyrgyz soldier walks past burnt houses on the Kyrgyz-Tajik border in the village of Kapchygay, 1000 km from Bishkek, Kyrgyzstan, on 21 September 2022. EPA-EFE/IGOR KOVALENKO