Former Ugandan president Milton Obote was welcomed by 10,000 supporters today as he made his first official return home since Idi Amin overthrew him in 1971.

The popular but controversial Obote addressed a fairground rally in this tiny farming community in Bushenyi District, where he pledged that "a new era is about to dawn in Uganda."

Although the event was billed as Obote's first return from his nine-year exile, it has been learned that, with the consent of the Tanzanian government, he made at least three clandestine trips to Uganda to consult with government officials in the months since Tanzanian-backed rebels ousted Amin in April 1979.

Although he has said he is not and does not want to be part of the Ugandan National Liberation Front government, Obote played an active part behind the scenes in the governments that followed the Amin dictatorship.

Obote has not declared himself a candidate for the Ugandan presidency. But he said he favors general elections by Sept. 30 "if possible," and his speech had the ring of a campaign address.

"Let it be known that Uganda's decade of shame is at last over," Obote said. "Let a message go across to the world that a new era is about to dawn in Uganda."

Appealing for unity and moral revival, he said, "Either we live together or we perish together; there is no other way."

It appears likely, although not yet certain, that Obote's Uganda People's Congress will nominate him as its presidential candidate, observers here said. The party was scheduled to meet in Bushenyi Wednesday to select a candidate, but the meeting has been postponed, probably until August, presumably because of infighting between factions supporting and opposing Obote.

With tears in his eyes, the former president kissed the soil as he stepped down from a Tanzanian military plane in the southwestern town of Mbarara. Obote plans to travel to Kampala, the capital, later this week before visiting other parts of the country.

In a recent interview in Dar es Salaam, Tanzania, where he has lived since he went into exile, Obote discussed his political plans. He said he is hedging his options.

"I'm not going back as a candidate," he said. "I have no office to regain.

But I'm a Ugandan. Uganda is now liberated; I must go home."

But, he added, if his party selects him, he will run for president in elections scheduled for later this year.

Obote explained that after almost a decade in exile, he must now determine firsthand both his own popularity and the strength of his party.

"We have not actually been operating as a party, but as a resistance movement," he said. "I have a chance of being reelected president of the UPC. As regards the presidency of Uganda, I think the question is rather premature."

Obote's political prospects have been enhanced by the military coup two weeks ago that put power in the hands of a military commission that includes several longtime Obote loyalists. Nevertheless, the former president said he wants no part of the unstable Uganda National Liberation Front government. "There have been three UNLF governments in one year," he said. "People think Uganda is Italy."

He added that if elected president, his priorities would be to create "stability" and "a very clean government."

Obote, who led his country to independence in 1964 and then served as its first president, is considered Uganda's most experienced politician.

While president, Obote tried to build a united state in a country rife with class and ethnic divisions. In foreign affairs he was a staunch supporter of the East African community and, along with his close friends. Presidents Julius Nyerere of Tanzania and Kenneth Kaunda of Zambia, he was an outspoken critic of colonialism and racism in southern Africa.

By 1971 Obote's popularity had been seriously eroded by his moves against the country's traditional kingdoms, dismissals and detention of political opponents and banning of opposition parties, nationalizations of foreign firms, and allegations of nepotism and tribalism.

After his overthrow, Obote came to Dar es Salaam, where the Tanzanian government continued to treat him like a head of state. He was given a stipend, a seafront house dubbed "State House No. 2", and round-the-clock security protection. He frequently dined with Nyerere.

In return the Tanzanians asked only that he keep a low public profile.

Behind the scenes, however, Obote was Amin's most persistent and formidable opponent. In 1972 Obote sent over 1,000 guerrillas into Uganda in an abortive attempt to topple Amin. They were overpowered by Amin's troops and several hundred were killed.