The Vietnamese border strike into Thai villages this week was a warning to Thailand to stop aiding Cambodian guerrillas fighting Hanoi's client government in Phnom Penh, Indochina analysts here believe.

Although Thailand has long maintained it is neutral in the Cambodian conflict, it has given sanctuary, sustenance and, some sources say, ammunition, to the Khmer Rouge and Khmer Serei units battling the Cambodian government that the Vietnamese installed in Phnom Penh in early 1979.

Thailand clearly feels that the risk involved in throwing its lot in with the Cambodian resistance, is less than the long-term threat to its security posed by a neighboring state controlled by Vietnam, its traditional enemy.

Thai officials privately say that fighting will have to continue three to five more years before Hanoi is sufficiently worn down to negotiate seriously.

From Vietnam's perspective, the incursion into Thailand was not a senseless outburst of aggression but a calculated, if cold-blooded, attempt to deny Cambodian guerrillas a sanctuary and to force the Thais into cutting off future support.

A corollary purpose was to disperse two border refugee settlements near the site of the attack where about 85,000 people had gathered, the analysts here said. The camps had been headquarters for anticommunist Khmer Serei (Free Khmer) resistance groups and an entry point for what Phnom Penh considered illegal relief rice and consumer goods.

Most of Hanoi's troops appear to have withdrawn to the Cambodian side of the poorly marked frontier. However, sporadic shelling continued from Thai batteries throughout the week.

The incursion came at a time when Vietnam's estimated 200,000 troops in Cambodia are under intensifying pressure from the guerrillals. The first monsoon rains have fallen, shifting the advantage away from Hanoi's forces with their armor and air support.

Attacks on small outposts and trains and ambushes along major highways within Cambodia have increased in the past four to six weeks. Snipers have fired on at least two cars carrying foreign journalists.

Vietnam's operation this week was clearly planned in advance. Vietnamese units occupying the Thai village of None Mak Mun brought with them Laotians fluent in the local Thai dialect.

Cambodian soldiers loyal to the Vietnamese-backed Heng Samrin government accompanied units that swept into the refugee camps, apparently to take charge of any civilians they found there.

Many diplomatic analysts here think Hanoi finally was prompted to launch the strike by Thailand's decision to begin repatriating volunteers among the 150,000 Cambodian refugees in U.N.-sponsored camps.

On the face of it, the repatriation was a purely humanitarian undertaking. But most of the 8,600 people repatriated in the past 10 days reentered the country at points controlled by the Khmer Rouge. The remainder crossed at Khmer Serei strongholds like Nong Chan, one of the camps overrun on Monday.

Repatriation was "aimed at introducing armed bands into Kampuchea [Cambodia] to sabotage the peaceful life of the Kampuchean people," Phnom Penh's official news agency recently charged.

The agency alluded to possible retaliation and asked if "Bangkok [would] stand by with its arms folded if there were such a violation of Thai sovereignty?" Three days later, Vietnamese troops crossed the border.

Reporters covering the first repatriations found that many of the returning refugees were men of military age. Some admitted openly they would rejoin the fight against the Vietnamese.

Last fall, Thailand won worldwide admiration for its "open door" policy toward Khmer refugees. However, many foreign refugee workers have been troubled by that policy's military implications, particularly in the U.N.-financed camp at Sakaew.

People in the camp had crossed en masse last October from a Khmer Rouge enclave as Vietnamese forces pressed close at the start of the dry season.

Among the refugees were large numbers of soldiers and political cadres who have done their best to maintain in the camp the authority of the angka, the Khmer Rouge's mysterious governing body.

Many refugee workers feel that Thai officials encouraged this, hoping the cadres eventually would lead everyone back to the Cambmodian jungles, riding Thailand of an unwanted refugee burden and aiding the fight against the Vietnamese.

Now that process has begun. Since June 17, about 7,000 people have left Sakaew, although 17,000 still remain in the camp. Healthy and well-fed soldiers are going home just as monsoon rains are beginning to hamper Vietnamese movements. The other 1,600 returning refugees left another U.N. camp at Khao I Dang for Khmer Serei zones.

As a result, Vietnam alleges Thailand's welcome to refugees is simply a cover for keeping alive resistance armies. Hanoi ranks this as one item in a long list of unfriendly acts from Thailand.

When Vietnamese troops advanced into western Cambodia early in 1979, Thailand allowed Khmer Rouge soldiers, political leaders and Chinese advisers to flee across the Thai border. A Thai helicopter even flew a short distance into Cambodia to pick up Khmer Rouge Foreign Minister Ieng Sary.

Several months later, Thai troops stood aside as a column of 80,000 Khmer Rouge soldiers and civilians snaked into Thailand ahead of a Vietnamese advance and then crossed back into Cambodia at a safter point.

Foreign journalists repeatedly have seen armed Khmer Rouge in Thai territory. Khmer Rouge wounded routinely have been sent across the border for treatment in Thai hospitals.

Recently, I visited a point on the Thai side of the border where relief agencies turn rice over to Khmer Rouge porters. Walking toward the border a few hundred yards away, I was told by a Khmer Rouge cadre to go no further. When I asked what authority he had to stop me, he replied, that the Thais had instructed him to supervise the area.

China makes no secret that it is supplying the Khmer Rouge. In the field, the guerrillas are often seen carrying brand-new radios and rocket launchers. Many Indochina watchers here assume supplies are delivered with the covert help of the Thai Army.

Official Thai sources have on occasion admitted to giving the Khmer Rouge ammunition. Last winter, foreign journalists watched as a column of Khmer Rouge women porters crossed a stream into Thailand and return laden with ammunition.

Despite denials, Thailand is also believed to aid certain Khmer Serei forces, in particular the Khmer People's National Liberatlion Front, run by former Cambodian prime minister Son Sann.