PREAH VIHEAR, Cambodia - A Cambodian general said a border standoff between his soldiers and Thai troops came close to a shoot-out as the confrontation over disputed territory surrounding an ancient temple entered its fourth day Friday.

The dispute, centered around Cambodia's 11th century Preah Vihear Hindu temple, came to a head last week when UNESCO approved Cambodia's application for World Heritage Site status for the site. Thai activists fear the new status will undermine Thailand's claim to nearby land.

Thai soldiers entered the surrounding area on Tuesday, staking out positions at a nearby Buddhist temple compound. However, some resident Cambodian monks remained and Cambodian soldiers have continued to visit them even after the Thais arrived.

A large group of Cambodian troops came to the compound Thursday planning to spend the night, and the two sides raised their rifles at each other when the Thais moved to evict them in an incident lasting about 10 minutes before the Cambodians departed, Cambodian Brig. Gen. Chea Keo said.

"We exercised patience to prevent weapons from being fired," he said.

Thai army spokeswoman Col. Sirichan Ngathong said she was "not aware of any incident where the two troops pointed guns at one another."

She said she could not comment further because she has not been briefed on the matter. "But the situation is stable. They (the troops) have been told to avoid any confrontation," Sirichan said.

The standoff is the latest in a long-standing conflict over border territory that has never been fully demarcated.

The U.S. Embassy, in a statement Friday, recommended that American citizens "defer travel to this area until the situation has been resolved."

To avoid military action, both countries have agreed to hold defense minister talks next Monday in Thailand.

Cambodian Prime Minister Hun Sen wrote a letter to Thailand's Prime Minister Samak Sundaravej on Thursday saying relations have been "worsening" since Thai troops "encroached on our territory," and asked Samak to pull them back.

"The deteriorating situation is very bad for the relations between our two countries," Hun Sen wrote.

The Thai government sent troops to the area after anti-government demonstrators made an issue of the disputed territory near the temple, decrying the government's endorsement of Cambodia's UNESCO application.

The demonstrators appear to be playing to nationalist sentiment to gain support for their larger goal of unseating Samak, whom they accuse of being a proxy for former Prime Minister Thaksin Shinawatra, who was ousted in a 2006 military coup for alleged corruption and abuse of power.

About 400 Thai troops are in the temple area, facing about twice as many Cambodians, Cambodian Brig. Gen. Chea Keo said Thursday.

Thursday night's incident, the first time the two sides pointed weapons at each other, occurred after 61 monks along with 13 nuns and lay people came to the Buddhist temple to celebrate the start of Buddhist Lent.

Chea Keo said about 50 Cambodian troops entered the pagoda hoping to stay the night to provide security for the monks and nuns, but the Thai soldiers moved to evict them, prompting the gun-pointing.

The only clashes so far have been between Thai protesters and Thai villagers who resent their land becoming the site of a political battle.

Samak has accused the Thai protesters of "trying to ignite a conflict." But he has not said anything about why the Thai troops moved to the border or the orders they have been given.

Adding to the unpredictability of the situation is ongoing political instability in Thailand, including possible splits within the military.

Some senior commanders, including army chief Gen. Anupong Paojionda, have played down the conflict, stressing a diplomatic rather than military solution should be sought. Others, like Air Chief Marshal Chalit Phukbhasuk, have taken a more strident stance.