Ugandan President Idi Amin appears to be facing a grave challenge to his 8-year-old rule amid reports today that anti-Amin forces were moving toward Kampala, the Ugandan capital, from their stronghold in Masaka, 80 miles to the south.

Reports from Kampala said the capital was tense as tanks were positioned at several strategic locations. Hundreds of refugees were reportedly camping in the city's soccer stadium.

There were conflicting reports about the situation at the southern regional center of Masaka, which was captured two days ago by an invasion force from Tanzania. Uganda Radio claimed today that troops loyal to Amin have recaptured Masaka after heavy fighting.

Ugandan exiles, however, maintained, that the anti-Amin forces was heading toward Kampala in an effort to oust what is generally regarded as one of the most ruthless regimes in the world. Moreover, there were indications that Amin is facing mounting internal opposition.

Although no official casualty figures have been released, Tanzanian and exile sources claim the Ugandan army has suffered heavy losses. They estimate that about 3,000 Ugandan troops have been killed or captured since October. The Ugandan army numbers about 20,000.

Exile reports also claim that the Ugandan air force has been decimated. Of Amin's 26 combat aircraft, Tanzania has shot down 18 and dissident pilots have flown two others to "a neighboring country." The remaining pilots have reportedly refused to fly and may have been arrested and even executed.

Although Amin has weathered numerous assassination attempts and army rebellions as well as one exile invasion, it appears that he may have made a serious blunder when he initiated a border war with Tanzania last October. The war was intended as a diversionary activity for his own divided and rebellious army, but it seems to have backfired, leading to the most widespread and sustained resistance to date.

According to former Ugandan president Milton Obote, who now lives in exile in Dar Es Salaam, "Amin's invasion of Tanzania was a serious miscalculation. He cannot fight on two fronts. The people of Uganda will take advantage of any opportunity to rise up against the regime."

By all reports, the country does appear to be slipping into open rebellion. Over the past few weeks anti-Amin forces have seized Masaka and several other southern Ugandan towns, virtually cutting the country in two. Mberea, the other major southern town, is today reported to be under siege and is expected to fall to the rebel forces.

The rebel forces include a unit, consisting of about 1,400 guerrillas who are loyal to Obote. This "army" was hurriedly assembled in December, largely from former military people living in exile in Tanzania. Despite Amin's frequent claims of an exile invasion, it appears that Obote's forces have only recently moved into Uganda.

Of the numerous internal opposition groups the Save Uganda Movement appears to be the largest and best organized, according to observers. One of its officials claimed that "more than 1,500 guerrillas" belonging to the movement are currently fighting throughout Uganda. This group has claimed responsibility for a series of recent acts of sabotage and assassinations of Ugandan army officials.

In addition, dissident units of the Ugandan army now appears to be linking up with other anti-Amin forces. A press release isseud Saturday allegedly from the Ugandan "suicide battalion" stationed at Masaka, claimed that the 1,000-man army unit had "revolted against the (Amin) regime" and had "liberated" Masaka district. The statement called upon Ugandan "soldiers in every unit to follow our example so as to avoid further unnecessary loss of life." There has been no official reaction from the Ugandan government.

However, if this traditionally loyal battalion has indeed defected it is a serious blow to Amin. At least two other battalions -- the Simba and Chui -- are widely reported to be disloyal to the Ugandan leader. Sections of the military are said to support Gen. Mustapha Adrisi, a powerful Amin adversary within the government who has miraculously survived several attempts to "remove" him.

Resistance groups claim to be getting all their arms inside the Ugandan army. According to an anti-Amin exile, "we aren't getting any from Tanzania or other countries. There are plenty of arms inside Uganda. That's the one thing Amin has flooded Uganda with."

The exact location and numbers of Tanzanian troops involved is not known, but Tanzanian sources indicate they are concentrated in the border area just inside Uganda.

Late last month President Julius Nyerere pledged that any further fighting would take place inside Uganda. But he has consistently denied that Tanzania wants to overthrow Amin or occupy Ugandan territory, arguing that Uganda must be "liberated" by Ugandans themselves

A Tanzanian official today dismissed as "absurd" Amin's latest charge that Tanzanian forces are using Israeli and anti-Castro Cuban mercenaries.

Tanzania has also captured large quantities of Ugandan military hardware, including tanks, personnel carriers, armored cars, trucks, artillery, mortars and small arms.

Amin has been desperately trying to replenish his military supplies. Several arms dealers in Spain and Portugal have reportedly refused to sell Uganda arms. There are some indications that Amin is being resupplied by Iraq.

In recent weeks Ugandan officials. including the minister of defense, have made repeated trips to Iraq. Air traffic controllers say that military supply planes have been making night time landings at Kampala airport, but the country of origin of these planes is not known.

In addition, these sources say that in the last week Morocco and the Palistine Liberation Organization (PLO) have sent about 1,000 military advisers to train Ugandan troops. The Arab forces are said to be stationed in Entebbe and around Kampala.