Although Uganda's former leader Idi Amin has been in exile for more than two years, the aftereffects of his rise and fall have left areas of three nations -- Uganda, Zaire and Sudan -- in turmoil.

Thousands of soldiers of Amin's defeated Army now roam the vast, trackless forests where those three countries converge. Reportedly still well-armed, the guerrillas ambush security forces and terrorize the local population as well as the hundreds of thousands of refugees who fled Uganda during and after Amin's repressive rule. Religious, tribal and political enmities among the refugees, as well as food shortages and disease, only make matters worse.

The governments of Sudan and Zaire have watched with growing apprehension as the refugees continue to flood into their countries. They fear for their already severely strapped economies and social and political stability.

Between April 1979, when Amin was ousted, until the end of September 1981, 140,000 Ugandan refugees arrived in the region around the Zairian border town of Aru, according to officials with the Office of the U.N. High Commissioner for Refugees. More than 45,000 of those refugees arrived since June, when attacks on civilians in Uganda's northwest region increased.

A total of 632,800 refugees are now in Zaire, says Musafiri wa Mahenga, Zaire's director of studies for the Social Affairs Ministry, including refugees from past upheavals in the neighboring countries of Rwanda, Burundi and Angola.

At least 250,000 more Ugandans have fled during the past two years into southern Sudan, a country that is already inundated in the north with about as many refugees from the Eritrean region of Ethiopia.

The majority of the Ugandan refugees fled the anarchy of West Nile Province, home of Amin, who belongs to the Kakwa ethnic group.

Thousands of Kakwa and their neighbors, the Lugbara and Madi, regardless of their feelings for Amin, have fled to the regions of their kindred neighbors in eastern Zaire and southern Sudan. The three ethnic groups straddle the borders of all three countries.

Amin's army and his Libyan allies were defeated by Tanzanian soldiers leading a column of Ugandan exiles called the National Liberation Army.

That same Liberation Army, swollen with hastily recruited and unpaid soldiers, is the force that has exacted a bloody vengeance on the people of West Nile Province. According to refugee officials here and diplomats in Kinshasa, wide areas of the West Nile have been virtually depopulated during the past 2 1/2 years. Arua, just inside Uganda, has been completely destroyed, they said.

Newton Osoa acknowledges that he is one of the lucky ones. The distressing memories of rape, murder and mayhem that cause his large frame to shudder do not touch any member of his family, all of whom he managed to spirit out of Uganda one night in mid-June while soldiers rampaged through his hometown of Arua.

"They were shooting all the men and boys and setting fire to the buildings," recalled Osoa with a quivering voice. "The women and girls, groups of soldiers were raping them until the victims were in very, very bad condition and then the soldiers shot them," said Osoa stumbling over his words and adding that he can still hear the screams.

Slipping out of Arua, Osoa ran to his farm, gathered his eight children, two wives, 20 cows and 15 goats and crossed the border that night to the town of Aru, 12 miles inside Zaire.

Fighting between Ugandan troops and guerrillas has spilled into the region around Aru. Ugandan troops, who claim the guerrillas hide among the refugees and then stage forays into Uganda, have crossed the border in hot pursuit several times during the past year.

The Zairian troops patrolling the border seem to be unable to stop such attacks. When Ugandan National Liberation Army forces clashed with guerrillas in October 1980 near the Zairian town of Isro, the garrison commander gathered his troops and fled west.

Since April, the Ugandan guerrillas have also carried out several attacks on troops in the area, Zairian regional commissar Elumbe-Olombe Bosombe said. "They have stolen cows and kidnaped people."

Tension near the border is further heightened by a blood feud involving two Zairian tribes in the region, the Walendu and Bahemia, adding to Zairian officials' fears of a general conflagration.

The delicate situation is not expected to improve as long as refugees remain massed in the border area. They prefer to stay close to the border in order to slip across to their Ugandan farms at night and collect produce.

But since Ugandan President Milton Obote visited his Zairian counterpart, Mobutu Sese Seko, in Kinshasa in April to discuss the mounting instability on their border, the Zairian gendarmes have been driving the refugees toward four interior refugee camps established by the Office of the U.N. High Commissioner for Refugees earlier this year.

But the camps were overcrowded with 33,000 refugees by the end of September, and the refugees keep pouring across the border.

Aid officials said that the refugees sort themselves out by tribe and religion, most being Moslem, in deciding to which of the four camps they will go.

But fighting has broken out several times in the camps between refugees identified with Amin's terror-filled rule and those who were opposed to the dictator. The refugees who opposed Amin feel they have been persecuted and resent his supporters, who were among the first to flee here in 1979.

"Yes, we're concerned because it presents a security problem here," one refugee official said. "The problems of Uganda have just been brought here with the refugees," said one refugee official.

To add to the misery, diseases have broken out in the border areas, where the refugees have to fend for themselves and food and medical supplies are scarce.

Gerard Muller, one of two physicians from the international Doctors Without Frontiers organization, said that measles and whooping cough among the children and tuberculosis among the adults "has reached serious levels of contagion" both among refugees and the indigenous Zairian population.

"We don't have time to count the numbers of children who die but the child mortality is very high," said Muller.

Since the most recent disturbances in western Uganda beginning in June, severe malnutrition "has become a general phenomenon" among the newly arriving refugees," he added.

Refugee officials said the rising incidence of malnutrition indicates months of insecurity in western Uganda during which farmers were not able to grow crops in the year-round growing season or were constantly on the move.