Hor Namhong, Cambodia's foreign minister, described the atmosphere of the talks as "very good, very friendly."

He said the two leaders had agreed to resolve the feud amicably for "the sake of our neighbourliness."

Earlier this month three Cambodian soldiers and a Thai soldier were killed in a firefight close to the 11th century Preah Vihear temple which straddles their common border.

The meeting in Beijing came as military officials from Thailand and Cambodia held separate talks in the Cambodian town of Siem Reap.

The talks between top military commanders began over a round of golf and continued into Friday under what Thai Lieutenant General Wiboonsak Neeparn said was a "friendly atmosphere".

However, a statement released by the Thai military delegation insisted that Thailand's soldiers would stand firm.

"The Thai side strongly reiterates that the position of our troop deployments is clearly inside Thai territory," it said.

Last week, a day after the violent clashes between the two sides, Cambodian and Thai military officials agreed to hold joint border patrols in a bid to ease tensions.

But Cambodian commanders have since backed out, saying such patrols are not possible in disputed areas.

Tensions between Thailand and Cambodia flared in July when the Preah Vihear temple was awarded United Nations World Heritage status, rekindling long-running tensions over ownership of land surrounding the temple.