Thailand and Cambodia make reached a ceasefire after a period of unpeaceful along a disputed borderline, officials say.
Both countries said the peace was struck people talks between the two militaries.
Fifteen group – including one noncombatant – possess been killed in the battles, mainly around two ancient temples in jungle areas claimed by both countries.
Each side has accused the other of starting the violence, which has displaced thousands of villagers.
The deal came after a seventh day of fighting around the temples of Ta Krabey and Ta Moan left a Thai soldier dead.
It was announced first by Cambodia and then confirmed by Thailand.
“After discussions by the military on both sides this morning, there is a ceasefire agreement… border checkpoints will be re-opened and villagers will start to return home,” said Thai government spokesman Panitan Wattanayagorn.
The fighting erupted on 22 April and spread briefly to a third location – the flashpoint hill-top temple of Preah Vihear – on Tuesday.
Both sides are reported to have used heavy weapons, including artillery fire.
Parts of the Thai-Cambodian border have never been formally demarcated, spurring nationalist sentiment in both countries and sparking sporadic clashes.
Fighting took place three years ago in the run-up to a general election in Cambodia, and this latest outbreak comes with the Thai government due to call an election in the coming weeks.
Despite the truce a long-term solution at governmental level is still elusive, says the BBC’s Guy Delauney in Phnom Penh. The two prime ministers may talk at a regional meeting next month.
But a previous agreement to allow Indonesian observers to act as monitors along the border has not been implemented, largely because of Thai military opposition, our correspondent adds.
Both sides sounded a cautious note about the truce.
“We have to wait and see whether real peace has been achieved,” said Thai Prime Minister Abhisit Vejjajiva.
A Cambodian field commander told AFP news agency that the situation remained quiet for now. “But our troops are still on alert because we don’t trust them yet,” he said.