Tanzanian and anti-Amin Ugandan forces entered the city limits of Kampala today and said they are on the verge of capturing the Ugandan capital.

Officials of the Uganda National Liberation Front predicted that Kampala could fall within hours, although they cautioned that the battle for the capital could last two or three days, depending on the level of resistance put by President Idi Amin's Libyan defenders.

Tanzanian sources said that the assault on Kampala is taking place from the south, west and north. The road to the east has been purposely left open to provide an escape rute for Libyan forces who are reported to be fleeing the city en route to Jinja, 50 miles to the east of the Ugandan capital.

Informed sources said that Tanzanian President Julius Nyerere sent a message to Libyan leader Col. Muammar Qaddafi informing him that a way out of Kampala would be left for the Libyan forces.

There was no new information on the whereabouts of Amin, who was reported to have visited troops in eastern Uganda Tuesday. Earlier, diplomats had speculated that he might retreat to the north where he has his main support, but it is increasingly felt that he will try to evacuate to Tripoli with the Libyans.

Despite sharp international criticism of him about continuing massacres and purges in which as many as 300,000 people are believed to have died, Amin long remained popular in Uganda. Since his abortive invasion of Tanzania last October, however, his support has waned.

Late in February, 15,000 to 20,000 Tanzanian and Ugandan exile forces launched a counteroffensive from the south, and Amin's forces hace consistently had to give ground.

Ther was a brief period late last week when it appeared that the arrival of about 2,00 Libyans had turned the tide, byt diplomats say the short-lived reversal was probably caused by the anti-Amin forces being temporarily overextended.

As has been the case in the month-long fighting, there was conflicting reports today, with Radio Uganda continuing to claim that Amin was confident of final victory even as opposition forces were reported in Kampala.

The preponderance of reports, however, from residents of the capital talking by phone to correspondents in Dar Es Salaam and Nairobi was that Kampala would fall shortly and that Amin's demise or departure would follow soon.

Last week, Amin's own forces disintegrated leaving the defense of the capital to the Libyans. Yesterday, Libya indicated that Qaddafi was reassessing the situation as his forces faced overwhelming opposition from mainly Tanzanian troops.

Wire services reported that the Libyans suffered what may have telling defeat at the hamlet of Kajansi on the main Entebbe-Kampala road Tuesday night. The defeat, in which the Libyans suffered scores of dead and wounded, effectively cut off the capital from the country's main ariport at Entebbe.

UPI reported from Nairobi that other units captured Mityana, to the west of Kampala, then swung to the north and captured the military barracks at Bombo before advancing on Kampala itself. Previously, the bulk of the Tanzanian forces had been concentrated on the southern and western outskirts of Kampala, a city of 400,000 population.

The invading force is reported to have entered the capital after taking the headquearers of Amin's Makindye military barracks, which has been the scene of alleged massacres during Amin's eight years in power.

Late tonight residents of the capital said the city was quiet except for occasional shots.

The Libyans reportedly retreated to Kampala and then along the road to Jinja, 50 miles to the east, where there is and airport which could be used for evacuation. Another possibility is that they would fall back to the north where Amin's forces still hold a military air base at Nakasongola, 65 miles from Kampala.

If these two possible evacuation routes are lost, the Libyans and any escaping Ugandans would only have oe out - by crossing the Kenyan border and flying out from Nairobi.

Such a spectacle would no doubt delight Tanzania and anti-Amin officials who have been highly critical of Kenya's support of the Ugandan dictator in recent weeks.

Kenya has allowed Libyan materiel to transit the country and has generally quietly backed keeping Amin in office for fear that a successor government would be left-leaning, meaning Kenya would be surrounded by such states.

Late last month the various anti- Amin factions met in northern Tanzania to form a united front to coordinate policy and plan the nature of a future government after Amin's defeat.

Milton Obote, Uganda's only president until overthrown by Amin in 1971, has been the leading oppostion figure during his years in exile in Tanzania but last month's meeting chose a compromise figure, Professor Y.K. Lule, to head up the United National Liberation Front, whichad up the United National Liberation Front, which is making preparations for an interim administration. CAPTION: Picture, IDI AMIN . . . whereabouts unknown; Map, no caption, By Richard Furno-The Washington Post