BANGKOK, Thailand (CNN) -- A month-long stand-off between Thai and Cambodian troops around an ancient temple in a disputed border region eased a bit with an agreement to withdraw many of the soldiers, a Thai military official said Saturday.
The militaries of both countries reached the agreement Friday, the Thai military official said.
The foreign ministers of Thailand and Cambodia plan to meet Monday to discuss a permanent solution to the dispute over which country owns the Preah Vihear temple on their shared border.
Both countries posted troops there last month after the United Nations approved Cambodia's application to have the 11th-century temple listed as a World Heritage Site -- a place the United Nations says has outstanding universal value.
Some in Thailand feared the United Nations' action would make it difficult for Thailand to assert its claim to disputed land around the temple.
Opposition parties used the issue to attack the government, which initially backed the heritage listing.
Cambodian Prime Minister Hun Sen, who has been in power since 1985, portrayed the U.N. recognition as a national triumph.
The temple dispute has caused the two countries to cut off their diplomatic relations twice in recent decades.