PHNOM PENH (Reuters) - Thailand and Cambodia agreed to a ceasefire on Thursday after a week of clashes that killed at least 15 people, wounded scores and sent more than 60,000 into evacuation shelters in Southeast Asia's deadliest border dispute in years.
The agreement caps seven days of sporadic artillery and small-rocket fire that fanned nationalist passions in both countries, threatened to overshadow elections in Thailand and reinforced doubts over Southeast Asia's ambitions to form a European Union-style community by 2015.
Cambodia's Defense Ministry said both sides agreed to keep troops in the area, hold regular meetings between field commanders and to leave their long-festering territorial disputes to a Thai-Cambodian Joint Commission on Demarcation for Land Boundary set up a decade ago.
They also agreed to open border checkpoints near two disputed 12th-century Hindu temples at the heart of the fighting, although it was unclear when villagers would be allowed back to their remote, ravaged towns.
"We will abide by the ceasefire from now on," Cambodian government spokesman Phay Siphan said. "Local commanders will meet regularly to avoid misunderstanding."
Thai government spokesman Panitan Wattanayagorn said he hoped this "initial agreement" would be respected. "On our side of the border, the regional commander is expressing confidence peace will hold."
But the agreement looks fragile. Both sides remained at odds over who controls the Ta Moan and Ta Krabey temples despite fighting that killed at least eight Cambodians and seven Thais.
"The temples are completely controlled by Cambodia," said Cambodian Colonel Suos Sothea.
"That is incorrect," replied Thai army spokesman Sansern Kaewkamnerd, when told of Cambodia's assertion. "Troops on both sides occupy the area around the two temples. It's counterproductive for Cambodia to spread that misunderstanding."
Thailand insists the stone-walled ruins reside in its Surin province according to a 1947 map. Cambodia says they are in its Oddar Meanchey province.
Sovereignty over the temples -- Preah Vihear, Ta Moan and Ta Krabey -- and the jungle surrounding them has been in dispute since the withdrawal of the French from Cambodia in the 1950s.
Thai Prime Minister Abhisit Vejjajiva expressed some reservations over the ceasefire. "We will have to see if it actually brings peace," he said.
Army chief Prayuth Chan-ocha said Thailand would stay on alert until Friday morning. "If there is no clash and no movement (of troops), the situation should start easing and both sides can start talking about other issues," he told reporters.
Earlier, Thailand reinforced the area with tanks following a night of shelling that killed a Thai soldier and wounded seven. Eight Thai tanks had rumbled through deserted villages toward the front lines where troops on both sides were sealed off by heavily guarded roadblocks.
Analysts have expressed skepticism the conflict -- which first flared with February 4-7 clashes near Preah Vihear that killed 11 people -- is really about sovereignty and say it appears politically driven from both sides.
Others say hawkish generals were colluding with nationalists to create a crisis that could cancel Thailand's elections, expected by July, and sideline the powerful opposition to preserve the royalist establishment's hold on power.
In Karb Cherng, a village on the Thai side of the border damaged by the shelling and mortar fire, houses were abandoned and small shops shuttered. Police and bomb squads patrolled the are for remnants of unexploded ordnance.
"Where do you hide when they are shelling all night. I want to go home and I want things to go back to normal," said Jarat Unanom, a 51-year-old farmer in an evacuation shelter.
The clashes are a setback for the Association of South East Asian Nations (ASEAN), a 10-member bloc with plans to become a regional community by 2015, illustrating the limits to regional diplomacy after the Thai army rebuffed international monitors proposed by ASEAN foreign ministers in February.
Indonesian foreign minister and ASEAN chairman Marty Natalegawa said his Thai counterpart, Kasit Piromya, agreed in a meeting in Jakarta on Thursday to the terms for independent monitors but the pact still required further approval.
"Basically the two sides must be saved from themselves, because we are in a cycle of one says this, the other says that, mutual recrimination and mutual accusation, precisely the kind of vicious circle that we are trying to reverse," he said.
Additional reporting by Panarat Thepgumpanat, Ambika Ahuja and Martin Petty in Bangkok, and Olivia Rondonuwu in Jakarta; Writing by Jason Szep; Editing by Andrew Marshall