About 100 refugees were wounded and several reportedly killed yesterday when rival Cambodian factions fought a four-hour gunbattle inside a crowded border camp, refugee workers said. It was the latest outbreak of violence between armed groups supposedly united against the Vietnamese-supported government in Phnom Penh.

Analysis said the casualities could give new urgency to attempts to demilitarize sections of the Thai-Cambodian border, where an estimated half million refugees have massed in recent months. Most live in thatch camps governed by feuding and poorly disciplined Khmer Serei (Free Khmer) guerillas who say they want to reestablish noncommunist role in Cambodia.

Small-arms fire erupted at midday in Camp 007, a sprawling settlement of close to 200,000 run by Free Khmers who call themselves the Khmer Angkor liberation movement.

Refugee accounts said Khmers at 007 were arrayed against 150 armed Cambodian who had walked into the camp. It was unclear how the fighting began or to what group the intruders belonged. Some witnesses said they were sent by a rival Free Khmer faction headquartered at Camp 204, four miles southeast.

Others said they were communist Khmer Rouge, who have maintained an uneasy truce with the anticommunist Khmer Secrei factions in the interests of expelling the Vietnamese-backed communists now in power.

Foreign doctors in the camp took shelter in foxholes, then withdrew and treated wounded in a nearby Thai village. Meanwhile, hundreds of thousands of people fled in panic. This morning witnesses reported the camp -- once Thailand's largest -- was deserted and partially destroyed by fire.

Free Khmer guerrillas have clashed repeatedly with Thai troops posted along the poorly marked border.

Because of problems with the rightests and signs that Vietnamese forces were moving closer to the border, the United Nations and the Thai government planned to move half a million civilians to safer camps deep in Thai territory.

However, only a fraction of the border population has actually made the move. This was partly because Free Khmer overlords, fearful their movements would collapse if the "citizens" left en masse, ordered their soilders to obstruct departures.

The Thais and many foreign missions and refugee agencies are seeking to turn the border camps into "safe havens."

Late last year, Thailand requested U.N. help in that effort. Air Marshal Siddyi Savetsila, the Cabinet minister in charge of refugee affairs, said the proposal calls for U.N. officers to take control of the camps and surrounding territory -- both in Thailand and Cambodia -- and to provide food, schooling and police services until the Cambodian conflict is resolved.