Kyrgyzstan and Tajikistan agreed to a "complete cease-fire" on Saturday after reports of fresh shooting and troop buildup in the aftermath of border clashes earlier this week that killed 49 people.
Clashes between communities over land and water along the long-contested border are regular occurrences, with border guards often getting involved. However, this week's violence was by far the most serious during the Central Asian pair's 30 years of independence.
Kyrgyzstan's health ministry said that its death toll from the shooting that began between the two militaries on Thursday had reached 34, with a hundred injured.
The two presidents spoke by telephone Monday in a bid to preserve the cease-fire that was agreed on Thursday but which broke down on both Friday and Saturday.
That prefaced a meeting of delegations headed by the countries' respective national security committee chiefs in which the pair agreed to create working groups to help enforce the cease-fire, Kyrgyzstan's national security committee said.
The committee said the groups would begin work at 2 p.m. GMT on Sunday.
Tajikistan's Foreign Ministry later published a statement confirming the agreement on the withdrawal of forces from the border and noted the "brotherly nations" had "declared their readiness ... to resolve all existing border issues."
Any long-term deal at the border may face resistance in Kyrgyzstan, where an angry crowd of several thousand citizens rallied in central Bishkek demanding weapons from the government to fight Tajiks at the border.
A statement released by the national security council via Kyrgyz President Sadyr Zhaparov's office said the demonstrators' demands were impossible to fulfill "because they are fraught with consequences."
By evening the crowd had mostly dispersed, an Agence France-Presse (AFP) correspondent reported.
Kyrgyzstan on Saturday announced two days of mourning for those who died in the conflict, which also saw at least 30 properties destroyed in its southwestern Batken region.
Despite Thursday's cease-fire, Kyrgyzstan's national security committee said Tajikistan's military had "opened fire on dwellings" in Batken's Leilik district on Saturday and was building up forces again.
Tajikistan's military also blocked off a strategic section of road, the security committee said.
It later noted traffic had resumed along the road in line with the new agreement.
Thousands of Kyrgyz were displaced from border villages on Thursday, many of whom were relocated to temporary shelters in the city of Batken.
An AFP correspondent who visited one such shelter – a school named after Soviet founder Vladimir Lenin – saw doctors distribute medicines to displaced persons as children bedded down on the floor of the school's gym.
Seyitbek Erkebayev, a physical education teacher at the school, said citizens "from all corners of Kyrgyzstan" had sent "everything from food to bedding" and socks.
"Now there are no hungry people here," Erkebayev told AFP.
Bibi Eshnazarova, 58, who took up in the shelter after fleeing her border village in slippers and underclothes, leaving her husband behind to look after their livestock, said she planned to get back to the border as soon as possible.
"I don't want to move anywhere. My land is good enough for me," Eshnazarova said.
Despite signs of tensions Saturday, high-level contacts between the countries are being maintained.
Zhaparov and Tajikistan counterpart Emomali Rakhmon spoke Saturday for a second time in two days, with the pair also agreeing to meet face-to-face in the near future.
The violence also sparked a flurry of diplomatic activity.
Neighbouring Uzbekistan's leader Shavkat Mirziyoyev and Kazakhstan's Kassym-Jomart Tokayev spoke with both presidents during the crisis, while Russian foreign minister Sergei Lavrov spoke with both foreign ministers Saturday.
Russia said it hoped the countries where Moscow maintains military bases would "strictly follow the commitments made" during bilateral talks, according to a Russian Foreign Ministry readout.
Border disagreements between the three countries that share the fertile Fergana Valley – Kyrgyzstan, Tajikistan and Uzbekistan – stem from demarcations made during the Soviet era.
The knotting, twisting frontiers left several communities with restricted access to their home countries.