Kyrgyzstan’s Ministry of Foreign Affairs said it has agreed to a ceasefire with Tajikistan after violent clashes erupted along their disputed frontier.

In a statement, the ministry said a “complete ceasefire” had been agreed from 8pm local time (14:00 GMT), with military forces returning to bases.

The truce also calls for the withdrawal of troops and military equipment from the border areas of Kyrgyzstan’s Batken and Tajikistan’s Sughd. In addition, a joint working group consisting of employees of law enforcement agencies and executive authorities of the two countries will be established. The group will “implement the planned measures and create appropriate stabilizing conditions for further fruitful negotiation process in the interests of the two friendly peoples and states.”

The clashes that started on April 28 close to the de facto Tajik enclave of Vorukh was due to a water dispute. It left at least 13 people killed and scores injured. Nearly 10,000 people were evacuated, reports said.

The altercation broke out when people from both sides hurled stones at each other after surveillance cameras were installed at a water facility. Border guards became quickly involved and military units from both sides began exchanging fire the next day.

According to reports, the two sides exchanged automatic rifle, machine gun and artillery fire in an hours-long battle over a strategic water facility.