Clashes at the borders of the two Central Asian neighbours have left several people dead and dozens injured.
Tajikistan's President Emomali Rahmon has met his Kyrgyz counterpart SadyrJaparov at a summit in Uzbekistan, Kyrgyzstan said, and ordered their forces to draw down after border clashes left dozens injured.
"The leaders of the two countries agreed to instruct the relevant structures to cease fire and withdraw forces and assets from the line of contact," the Kyrgyz presidency said in a statement following Friday's meeting, after Kyrgyz authorities announced a ceasefire deal had been reached.
Kyrgyzstan had accused Tajikistan's forces of escalating the fighting by firing rockets on the border town of Batken, with a population of around 30,000 people in the south east of the country.
Shortly after, Kyrgyzstan's border guards said in a statement that the two countries' national security chiefs had agreed a ceasefire that would begin at 16:00 local time (1000 GMT).
The clashes escalated while the leaders of both countries were participating in the Shanghai Cooperation Organization Summit, with Central Asian power brokers Russian leader Vladimir Putin and Chinese President Xi Jinping both in attendance.
The head of a security alliance led by Moscow said earlier Friday that officials in both capitals had supported the implementation of a ceasefire and negotiations.
However, Kyrgyzstan's border guard service said "violent clashes" had broken out "along the entire perimeter of the Kyrgyz-Tajik border in the Batken region".
It accused Tajikistan of using heavy weapons, including rocket launchers and jets, but said its forces were repelling the attacks "making it impossible for them to capture settlements in Kyrgyzstan."
The health ministry said 42 people had been injured and that medical facilities in the border region of Batken had been put on alert. It appealed to border-region residents to donate blood. Bishkek also said it was launching civilian evacuations from the border region.
Kyrgyzstan and Tajikistan accuse each other of using heavy weaponry including tanks and mortars in an escalating border conflict pic.twitter.com/OvGtmpg7Gc— TRT World Now (@TRTWorldNow) September 16, 2022
Tajikistan accused Kyrgyz forces meanwhile of opening fire early Friday with "intensive" shelling of homes and civilian infrastructure. It did not give information about casualties.
Russian state news agency RIA Novosti, citing official sources, however reported that one Tajik border guard was killed and three more were injured.
Russia offers mediation
Russia's foreign ministry repeated an offer to oversee talks between the countries as the ceasefire was announced and asked them to negotiate an end to the dispute.
"We call on both sides to take urgent and comprehensive measures to bring the situation to political and diplomatic channels and to stop any attempts at escalation including by provocations from third parties," the foreign ministry said.
Fighting regularly flares up between the two countries that share a 970 kilometre-long border, with around half of the frontier contested. In 2021, unprecedented clashes between the two sides killed 50 people.