Thailand and Cambodia agreed to an "immediate" ceasefire on Saturday, the two countries said in a joint statement, pledging to end weeks of deadly border clashes.
At least 47 people were killed and more than a million displaced in three weeks of fighting with artillery, tanks, drones and jets, according to official tallies.
The conflict spread to nearly every border province on both sides, shattering an earlier truce for which US President Donald Trump took credit.
"Both sides agree to an immediate ceasefire after the time of signature of this Joint Statement with effect from 12:00 hours noon (local time) on 27 December 2025," said the statement signed by the two countries' defence ministers at a border checkpoint on the Thai side.
The truce applies to "all types of weapons, including attacks on civilians, civilian objects and infrastructures, and military objectives of either side, in all cases and all areas", it said.
Both sides agreed to freeze all troop movements and allow civilians living in border areas to return home as soon as possible, the statement added.
They also agreed to cooperate on demining efforts and combatting cybercrime, while Thailand is to return 18 captured Cambodian soldiers within 72 hours.
Thai Defence Minister Nattaphon Narkphanit said that initial three-day window would be an "observation period to confirm that the ceasefire is real".
In a speech earlier on Saturday he called the truce "a door to a peaceful resolution" of the border dispute.
Displaced Cambodian Oeum Raksmey told AFP she was "very happy that people can return home" if the fighting stops.
"But I dare not return home yet. I am still scared. I don't trust the Thai side yet," said the 22-year-old, who was evacuated with her family from their home near the border to a shelter in Cambodia's Siem Reap province.
- 'Real peace' -
On the other side of the border, 55-year-old Thai village head Khampong Lueklarp was similarly cautious.
"I personally think the ceasefire won't really happen," said the head of Ban Ta Sawang Samakkee village in Sisaket province, adding he hopes for "a real peace".
The ceasefire comes after three days of border talks convened following a crisis meeting of foreign ministers from the Association of Southeast Asian Nations (ASEAN), of which both Cambodia and Thailand are members.
The United States and China also pushed for the neighbours to cease fighting.
The foreign ministers of Thailand and Cambodia both said Saturday they will visit China on January 28-29 to meet Beijing's top diplomat Wang Yi and hold trilateral talks.
The conflict between the two Southeast Asian neighbours stems from a territorial dispute over the colonial-era demarcation of their 800-kilometre (500-mile) border, where ancient temples are claimed by both sides.
Five days of fighting in July killed dozens of people before a truce was brokered by the United States, China and ASEAN chair Malaysia.
Trump witnessed the signing of an expanded agreement between Thailand and Cambodia in October, but it was broken within months.
Each side blamed the other for instigating the fresh fighting this month and traded accusations of attacks on civilians.
- 'Final signing' -
At least 25 Thai soldiers and one Thai civilian were killed in the latest round of clashes, officials said.
Cambodia, which is outgunned and outspent by Bangkok's military, said 21 civilians were killed.
Phnom Penh has reported no military deaths, even as an an official Facebook post showed first lady Pich Chanmony, the wife of Cambodia's leader Hun Manet, attending a funeral of troops killed in the fighting.
The fighting was still raging as this week's border talks were underway.
Cambodia accused Thailand on Friday of intensifying its bombardment of disputed border areas, and Thai media reported overnight Cambodian attacks.
While both sides agreed to halt the fighting, they will still need to resolve the demarcation of their border following the ceasefire.
The contested temples are claimed by both nations because of a vague demarcation made by Cambodia's French colonial administrators in 1907.
Thai Prime Minister Anutin Charnvirakul sounded an upbeat note Friday night, before the joint statement was signed.
"You can trust Thailand. We always uphold our agreements and commitments. Let this be the final signing, so that peace can be restored and our people can return home," he said.
Thailand is set to hold general elections on February 8.