Pol Pot, the shadowy Cambodian dictator who engineered a reign of terror in which as many as 2 million of his countrymen died, has retired as military commander of the communist Khmer Rouge guerrilla group, a Khmer Rouge broadcast announced today.

The unexpected move was hailed immediately by spokesmen of two noncommunist Cambodian guerrilla groups that, like the Khmer Rouge, are battling the six-year-long Vietnamese occupation of their homeland. Thailand, which supports the resistance groups operating largely from the Thai-Cambodian border area, said the retirement could help the prospects for negotiations with the Vietnamese on a settlement in Cambodia by meeting Hanoi's demand for the "elimination" of Pol Pot.

However, some western diplomats cautioned that the change could be merely a "cosmetic" effort to improve the Khmer Rouge image before a conference this week of the Nonaligned Movement in Luanda, Angola, and the opening later this month of a U.N. General Assembly session. Both the Vietnamese and the Cambodian resistance groups have tried in the past to improve their images and portray their negotiating positions as more flexible prior to the opening of the General Assembly.

The announcement of Pol Pot's retirement came in an Aug. 24 communique broadcast today by the clandestine Khmer Rouge military radio, believed to be operating from southern China.

The communique, in the name of titular Khmer Rouge leader Khieu Samphan, declared a retirement age of 60 for "civil and military cadres" in the guerrilla organization and indicated that Pol Pot, who is thought to have turned 60 in May, retired for that reason.

No other explanation was given, although Cambodian sources here mentioned Pol Pot's long-rumored poor health and signs of an internal power struggle as other possible reasons.

In announcing the retirement, the Khmer Rouge radio said the Supreme Military Council that Pol Pot formerly headed had been abolished as of the Aug. 24 date of the communique. It said Pol Pot would now become "director of the Higher Institute for National Defense," described as an advisory body.

The statement said Son Sen, the number three man in the former Supreme Military Council of the Khmer Rouge, had been named "supreme commander of the Democratic Kampuchean National Army," in effect replacing Pol Pot as the Army's commander in chief.

Democratic Kampuchea is the official name of the Khmer Rouge regime, which took power in Cambodia in April 1975 by defeating the U.S.-supported Lon Nol regime.

After seizing power, the Khmer Rouge forcibly emptied Cambodia's cities and embarked on a radical campaign to destroy the existing Cambodian society and forge a completely new state of "total communism." Approximately 1 million to 2 million Cambodians died of overwork, starvation, disease and mass executions as the Khmer Rouge brutally enforced a policy of compulsory collective agriculture aimed at ridding the country of every vestige of foreign or bourgeois influence.

As premier and secretary general of the Communist Party of Kampuchea, Pol Pot presided over the country's transformation.

Vietnamese forces invaded in December 1978 and drove the Khmer Rouge from the capital, Phnom Penh, the following month. In their place, Hanoi installed a client government headed by a Khmer Rouge defector, Heng Samrin.

However, the Khmer Rouge regime retained U.N. recognition as Cambodia's legal government, largely because recognition of the Heng Samrin government would effectively legitimize the invasion of Cambodia by a neighboring country. The Khmer Rouge enhanced its status by drawing two noncommunist Cambodian resistance groups into a "coalition government of Democratic Kampuchea" in 1982.

The noncommunist groups are headed by Cambodia's former ruler, Prince Norodom Sihanouk, and his one-time premier, Son Sann, now coalition president and premier, respectively.

According to a spokesman for Son Sann's group, the Khmer People's National Liberation Front, the announcement of Pol Pot's retirement could be "a very positive step."

"It shows they are not inflexible," said Vora Huy Kanthoul.

"Every Cambodian welcomes that," said a spokesman for Sihanouk's faction. "Nobody likes Pol Pot."

Both groups said the Khmer Rouge neither consulted nor informed them of the move even though a "cabinet meeting" of the coalition government was held Aug. 28.

On Friday, Sihanouk told correspondents that Vietnamese calls for the elimination of Pol Pot were aimed only at splitting the coalition and getting rid of the best military commander in the resistance.

According to Sihanouk and other Cambodian sources, Pol Pot long has suffered from malaria and other ailments.

Noncommunist Cambodian sources also said there were signs of a rivalry between Pol Pot and Son Sen (no relation to noncommunist leader Son Sann), the former Khmer Rouge defense minister who was named today as the new supreme military commander. Son Sen reportedly was about to be purged by Pol Pot when the Vietnamese invaded in late 1978. Occasional clashes since then have been reported between soldiers loyal to Son Sen and guerrillas under Ta Mok, who held the number two position in the just-abolished Supreme Military Council.

There was no mention of Ta Mok in today's broadcast, but he is believed to be over 60 and thus affected by the retirement order.

Today's communique referred to titular Khmer Rouge leader Khieu Samphan for the first time as "president of the Democratic Kampuchean side," a formulation that Cambodia watchers said could represent the restoration of an official Khmer Rouge political entity. After being driven from power in 1979, the Khmer Rouge removed Pol Pot from his political posts, abolished the communist party and -- in their pronouncements at least -- embraced capitalism.

Following formation of the coalition government, the Khmer Rouge cabinet and a front organization under Khieu Samphan were no longer mentioned.

Khieu Samphan henceforth was referred to only as vice president of Democratic Kampuchea, his position under Sihanouk in the coalition government. That left the military council under Pol Pot as the only formally constituted decision-making body within the Khmer Rouge.

In today's announcement, Son Sen was named as "vice president of the Democratic Kampuchean side," confirming the promotion of the 55-year-old former high school teacher.