"Having noted that the temple area had been the scene of armed clashes between the parties and that such clashes may reoccur, the court decided... there was an urgent need for the presence of all armed forces to be temporary excluded from a provisional demilitarised zone around the area of the temple," the judge said.
Cambodia in late April launched a bitter legal battle before the ICJ in which it asked for an interpretation of a 1962 ICJ ruling around the 900-year-old Preah Vihear temple.
It also asked the court, while judges were pondering that request, to approve provisional measures including an immediate Thai troop withdrawal and a ban on all Thai military activity there.
Although Thailand does not dispute Cambodia's ownership of the temple, secured by the 1962 ruling, both Phnom Penh and Bangkok claim the 4.6-square-kilometre (1.8-square-mile) area surrounding the Khmer complex.
However fresh clashes broke out in April further west, leaving 18 dead and prompting 85,000 civilians to flee.
The court Monday urged the two countries to continue to work with the Association of Southeast Asian Nations (ASEAN) to come to an agreement to allow observers representing the 10-nation bloc to have access to the provisional demilitarised zone around the temple.
"Both parties should refrain from any action which might aggravate or extend the dispute before the court or make it more difficult to resolve," the court added.
The UN's highest court Monday also ordered Thailand not to obstruct Cambodia's free access to the Preah Vihear complex or prevent Cambodia from taking fresh supplies to its non-military personnel there.
Cambodia said although there had been clashes in the past, Thai aggression substantially increased after July 2008, when the UN's cultural body UNESCO listed the temple as a World Heritage site.
The 11th-century complex has been at the centre of a long legal wrangle between Thailand and Cambodia -- which first took its southeastern Asian neighbour to the ICJ in 1959 over the issue.
Thailand's Foreign Minister Kasit Piromya said Monday his country would honour the ICJ ruling.
"We are satisfied in the sense that the decision of the withdrawal of the troops is applicable to both Cambodia and Thailand," he told reporters afterwards.
Established in 1945, the ICJ is the UN's highest judicial organ and it settles disputes between states. It is the only one of six principal UN organs not located in New York.
All Rights Reserved.