Thailand and Cambodia have agreed to an immediate ceasefire, said the defence ministers in a joint statement on Saturday. Both countries will stop all troop movements and let civilians living near the border return home. This ends weeks of violent fighting that killed at least 41 people and displaced almost one million. The ceasefire began at noon local time (05:00 GMT). If the ceasefire holds for 72 hours, Thailand will release 18 Cambodian soldiers it is holding. The two sides reached this deal after several days of talks. The statement said both sides must stop attacks on civilians, infrastructure, and military targets. "Both sides must avoid unprovoked firing or advancement or movement of troops towards the other side's positions or troops," it said. The 18 soldiers' release will follow "the spirit of the Kuala Lumpur Declaration," a peace agreement signed in October with US President Donald Trump present. That deal was broken earlier this month when fighting started again. Both countries blamed each other for breaking the truce. The Thai army said Cambodian forces fired first in Ubon Ratchathani Province, killing a Thai soldier. Cambodia said Thai forces attacked first in Preah Vihear province and claimed it did not fight back. Clashes continued through December. On Friday, Thailand carried out air strikes on a disputed area in Cambodia, targeting a Cambodian military position after civilians left. Cambodia called these "indiscriminate attacks" on civilian homes. The border dispute goes back over 100 years but got worse in May when a Cambodian soldier died in a clash. Intense fighting in July caused many deaths and forced thousands to flee. After efforts from Malaysia and Donald Trump, a ceasefire was signed in late October called the "Kuala Lumpur Peace Accords." The deal required both to remove heavy weapons and set up observers. But Thailand paused the agreement in November, with Prime Minister Anutin Charnvirakul saying the security threat was still high. Now, the new ceasefire is a fresh chance for peace along the tense border.