Cambodia welcomed and Thailand accepted a UN ruling Monday awarding most of the disputed border land around an ancient temple to Cambodia -- an issue which sparked deadly clashes in the past.
Nervous Cambodians had dug bunkers or evacuated homes earlier Monday in anticipation of trouble following the International Court of Justice ruling at The Hague, while many Thai schools along the border were shut for the day.
Following the ruling Cambodia's strongman Prime Minister Hun Sen addressed his nation on television, reiterating a pledge to work with Thailand to keep the border peace and "not do anything that will lead to tension".
But he added: "This is a significant step forward... towards a peaceful resolution."
At least 28 people have been killed in outbreaks of violence since 2011 over the ownership of a patch of land next to the 900-year-old Preah Vihear temple.
The issue inflames nationalist sentiment in both countries -- not least because both governments, experts say, have used it to drum up support or as a distraction from domestic politics.
The UN's top court ruled that most of the area around the 11th century temple belongs to Cambodia and that any Thai security forces there should leave.
Despite the apparent blow Thai Prime Minister Yingluck Shinawatra agreed to hold talks with Cambodia, adding she would protect her kingdom's interests.
"The government has asked the military... to take care of peace along the border," she said in a television address, reflecting the importance of the ruling to patriotic Thais.
Tens of thousands of people were displaced in the 2011 fighting, leading Cambodia to ask the ICJ for an interpretation of the original 1962 ruling on ownership of the contested parcel of land.
Thailand does not dispute Cambodia's ownership of the temple, a UNESCO World Heritage site, but both sides claimed an adjacent 4.6-square-kilometre (1.8-square-mile) piece of land.
The mood on both sides of Preah Vihear temple had been tense before the ruling.
"We have already prepared our bunkers in case Thai troops open fire," So Phany, a Cambodian vendor near the temple, told AFP.
Other villagers along the border with Thailand left their homes altogether, fearing the worst, said an AFP photographer at the scene.
Dozens of locals near the temple complex crowded around grainy television screens in coffee shops as the ICJ began the live broadcast of its deliberations.
The ruling has heaped further pressure on Yingluck's government, which is already grappling with mass street demonstrations against a controversial political amnesty bill.
Last year the ICJ ruled that both countries should withdraw forces from around the ancient Khmer temple, which is perched on a clifftop in Cambodia but is more easily accessed from the Thai side.