PHNOM PENH, JUNE 30 -- Almost 10 years after invading Cambodia to oust the notorious Khmer Rouge regime of Pol Pot, Vietnam today officially withdrew its military command staff and announced for the first time that 55,000 of its soldiers have died since fighting began.

Vietnam also said it had turned over its remaining occupation troops to the control of the fledgling Cambodian Army. The withdrawal of the military command is part of Vietnam's decision to phase out its direct military role and turn over to the Cambodians the long and costly war against a three-group guerrilla coalition.

For Vietnam, which has suffered from a half-century of continuous warfare, an end to its most recent and most divisive conflict will leave its leaders free to address the country's devastating economic and social problems and could help end its international isolation. But the Vietnamese withdrawal leaves Cambodia with an uncertain political future and the prospect of continued civil war among competing Khmer factions.

Lt. Gen. Le Kha Phieu, deputy commander of the Vietnamese forces in Cambodia, said at a press conference today upon his return to Ho Chi Minh City that about 55,000 Vietnamese troops have been killed in the Cambodian conflict since 1977, and an equal number have been wounded. He said 30,000 of those fatalities came during a series of Cambodian-instigated border clashes in 1977-78, while another 25,000 troops were killed in the 9 1/2 years of the Vietnamese occupation.

The total of 55,000 Vietnamese troops killed was close to the approximately 58,000 Americans killed in Indochina. Vietnam lost an estimated 2 million in the north and south during its U.S.-involved civil war, as many as half of them military. Today was the first time Vietnam had revealed the extent of its casualties in the Cambodian conflict, which some western analysts have referred to as "Vietnam's Vietnam" because of similarities to America's failed intervention in the region.

More than 13,000 Vietnamese occupation troops have already left Cambodia this year, according to Vietnamese and Cambodian officials, with a total of 50,000 expected to be withdrawn by next January.

Foreign residents and relief workers here said they have seen several convoys of Vietnamese troops leaving over the last few weeks with tanks, artillery and other heavy weapons. Western analysts in the past have dismissed Vietnam's announcements of troop withdrawals as disguised troop rotations, but analysts said they believe the current withdrawal is genuine.

This year's pullout would leave only about 50,000 remaining troops from an initial occupation force of more than 150,000, by many estimates. Vietnam, which has admitted to having 90,000 to 100,000 troops in Cambodia, has repeatedly pledged to withdraw all of its forces by 1990, and as that date approaches, the Cambodian factions and their backers are engaged in intense behind-the-scenes maneuvers, hoping to conclude a negotiated political solution before then.

After a flag-draped ceremony under a scorching sun at the Pochentong airport here, Gen. Le Ngoc Hien, commander of the Vietnamese military forces in Cambodia, boarded one of three aging Soviet-made Mi8 helicopters and flew to Ho Chi Minh City. Before leaving, the helicopters circled the airfield three times for the benefit of the hundreds of journalists, photographers and cameramen invited to witness the event.

More than 300 members of Vietnam's military command staff also boarded planes and left for Vietnam. Over their familiar drab green uniforms they wore traditional colorful Cambodian kroma scarves given to them as departing gifts by a boisterous crowd at the airport.

For Vietnam, the Cambodian invasion of December 1978 -- aimed at ousting Pol Pot's reviled Khmer Rouge regime and ending attacks on its southwest border -- turned into a quagmire. Vietnamese troops became locked in a guerrilla war against the tenacious three-party resistance coalition recognized by the United Nations. Different factions of the coalition are backed by China, Thailand and the United States.

Vietnamese and Cambodian officials over the last few days said the departure marked a recognition that Cambodia is now able to defend itself against the resistance forces, which include the Khmer Rouge army, the largest of the three rebel groups.

"From this day, all the party, the Army and the people take upon themselves the task of defending the government," Heng Samrin, the Cambodian communist party leader, told a party meeting this week. The guerrillas, he said, "have not been able to occupy a single inch of territory."

But Vietnam's decision to begin withdrawing its troops was largely motivated by its own domestic political concerns -- mainly its stagnant economy and the crippling effect of its international isolation that resulted from the Cambodian occupation. Vietnam's newly elected prime minister, Do Muoi, told the National Assembly last week, "The renovation in relations between Vietnam and foreign countries is very important."

The Cambodian conflict is also believed to have met bitter, if muted, resistance at home from young men, mostly southerners, who were rounded up to serve as "volunteers" in Cambodia.

Pressure from Hanoi's most important ally, the Soviet Union, is thought to have played a role in Vietnam's decision to begin the phased withdrawal. Soviet leader Mikhail Gorbachev is anxious to improve his country's relations with China and with the noncommunist countries of Southeast Asia, but his overtures have been blocked because of the presence of Vietnamese troops, with their Soviet weapons, in Cambodia.

The outward confidence exhibited by Cambodian officials over their ability to defend themselves seemed to mask uncertainty over whether the country can long survive without the protection of Vietnam's occupation army. "The people used to count on them for their security," said Hun Sen, prime minister of the Vietnamese-installed government, "so this withdrawal of Vietnamese troops will naturally induce this first wave of anxiety."

"The Khmer were worried over our withdrawal announcement," said a high-ranking civilian Vietnamese official in Phnom Penh, using the word here for Cambodians. He said the withdrawal decision -- and particularly the decision to withdraw the Vietnamese military advisers here -- provoked "very hot discussions" between Hanoi and its Cambodian allies who were worried about whether they were ready to defend themselves. "The . . . government may not be confident they are fully able to fight," the official said.

A western relief worker here said, "People wanted to see the Vietnamese go, but they are still nervous. We'll just have to wait and see." Another foreign relief worker added, "I've got my fingers crossed -- and I've also got my bags packed."

Vietnam leaves behind a government of its own making, a communist party pulled together primarily from defectors from the ousted Khmer Rouge regime, and an inexperienced Cambodian Army largely untested on the battlefield. It also leaves behind an unsettled political situation that has filled many Cambodians with anxiety over whether this tiny, ravaged country will again become a battleground.

"Of course, we realize that the civil war will continue, with the Pol Pot forces operating in small units," said Hun Sen, in a press conference yesterday. "But they have no chance of overthrowing us by military means."

The fear among many Cambodians is that the withdrawal of Vietnamese troops will leave an opening for the well-armed Khmer Rouge to fight its way back into power in Phnom Penh. The Khmer Rouge seized power in April 1975 and presided over a bloody rein of terror until it was ousted by Vietnamese troops. Between 1 million and 2 million Cambodians are estimated to have died under the Khmer Rouge from starvation, disease and mass executions as the country was turned into a vast labor camp.

The Khmer Rouge is now widely believed to be following a strategy of quiet infiltration into the Cambodian interior, stockpiling weapons and laying the groundwork for a major offensive to retake Phnom Penh once the Vietnamese troops leave. The other two groups in the rebel coalition, both noncommunist, are not as powerful as the Khmer Rouge. While interested parties try to negotiate a political settlement that could bring a coalition government to Phnom Penh, it is not clear whether such an arrangement can be made.

The Cambodian government plans to rely mainly on its village-level armed militia network to supplement the armed forces in beating back the expected Khmer Rouge assault.

The government is also hoping the newly constituted Cambodian Army, with its pipeline of Soviet arms and equipment, will be able at least to keep the Khmer Rouge from taking major population centers.