Kyrgyzstan and neighbouring Tajikistan have agreed to withdraw troops from their borders after fresh fighting that left about 40 people dead and 175 wounded.
The heads of national security for the two former Soviet republics in Central Asia agreed to the pullback during a meeting on Saturday.
"Today when we've discussed the issue, we've reached principal agreements to solve the issues in the interests of securing the peace and the stability in Kyrgyzstan and Tajikistan. I'm sure that we can achieve that," said Saimumin Yatimov, head of the State Committee of National Security of Tajikistan.
The fighting broke out on Wednesday when Tajik officials attempted to mount surveillance cameras to monitor a water supply facility near the village of Kok-Tash in Kyrgyzstan.
"I hope there will be the full silence, the peace, the calamity in our countries. In particular, in the territories on the border," said Kamchybek Tashiev, head of the State Committee of National Security of Kyrgyz Republic. "We very much hope that the reached decisions - which we wrote in the protocol - will be executed."
Both nations have claimed the area around the water supply facility, a dispute dating back decades to when they were both part of the Soviet Union.
Residents of Kyrgyzstan opposed the surveillance attempt; Kyrgyz and Tajiks began hurling stones at each other, and troops quickly entered the fray.
Kyrgyz officials say 33 people were killed on their side and about 7,000 area residents were evacuated.
Tajik officials have not announced casualties on their side, but media reports say about eight people were killed.