Cambodia and Laos reached an agreement on Saturday for Lao soldiers to pull back from their shared border after Cambodia accused Laos of sending troops into its territory, the leaders of both countries said.
Cambodian Prime Minister Hun Sen on Friday dispatched forces to the border and issued an ultimatum for Laos to withdraw the soldiers by Thursday.
The Cambodian strongman flew to Vientiane on Saturday to hold urgent talks with Lao Prime Minister Thongloun Sisoulith.
In a news conference after the meeting, broadcast live on Hun Sen's Facebook page with simultaneous translation into Khmer, the Lao leader said he had ordered the withdrawal.
"I've ordered the authorities involved to withdraw troops from that area by tomorrow morning," Thongloun Sisoulith said.
Thongloun said he was sorry he had not responded to an August 2 letter from Hun Sen seeking withdrawal of the troops.
"Anyway, the discussion today was frank and friendly, so that the area would not lead to forces being confrontational," he said.
Thongloun did not say whether Laos admitted to having sent troops into Cambodia, which says about 30 soldiers from Laos crossed into its province of Stung Treng in April.
Hun Sen said he had also ordered Cambodian forces sent to the border - truck-mounted rocket launchers and ground troops - to pull back in response to Laos's agreement to withdraw.
"Our biggest success is that there is no dispute that can't be solved," Hun Sen said at the news conference.
"Moments ago, I already ordered all troops that were mobilised yesterday to go back to their positions."
Hun Sen said a border commission from both countries would begin working in the area once troops have withdrawn.
An official at the Lao embassy in Phnom Penh told Reuters on Friday the border area was the subject of a territorial and demarcation dispute.
Laos wants Cambodia to stop clearing land there for road-building and allow checks by inspection panels from both countries, the official said.