(CNN) They were the sporting heroes of a nation, the no-hopers that showed up Africa's footballing establishment and whose success saw them showered with gifts by the notorious dictator Idi Amin.

Yet the tale of the last Uganda team to qualify for the Africa Cup of Nations -- the continent's showpiece international tournament -- is one that former defender Tom Lwanga looks back on with conflicting emotions.

Despite defying the odds and upsetting some of the continent's strongest teams to make the 1978 AFCON final, Lwanga says he and his teammates returned home to a muted reception after a controversial loss to host nation Ghana.

Within a matter of years, at least two of the 1978 team would be dead as the brutal Amin regime collapsed. Others were forced to flee as Uganda descended into chaos.

From 1971 to 1979, Uganda was gripped by one of the most violent dictatorships in history after Amin came to power via a military coup. An estimated 500,000 deaths and disappearances have been attributed to his regime.

"We were the underdogs and that helped us to fight even harder to prove a point to the teams," Lwanga tells CNN as he recalls his experiences of the 1978 AFCON in a telephone interview from Uganda.

"(But) when we came back there was nothing. Only our families at the airport to receive us."

An AFCON journey

Lwanga describes the team being treated with a near regal reverence after defeating Zambia to win the East and Central Africa Championship in Zanzibar in 1976.

Amin arranged a plane to transport them back to Uganda, ordering the team to stay in the air so they could have a party before landing.

The man dubbed "The Butcher of Uganda" later organized an all-expenses-paid shopping trip to Tripoli, Libya, providing spending money for each player as a reward, Lwanga says.

General Idi Amin: Ugandan soldier, dictator and head of state (1971-1979).

Yet 1978 was different.

Uganda's "Cranes" went to Ghana as an unfashionable long shot. Most of the players were amateurs with day jobs in the police, army, as prison guards or in the civil service. By comparison, many of their opponents were professionals, Lwanga says.

Tom Lwanga played for Uganda at the AFCON in 1978.

But Uganda quickly became the tournament's surprise package after edging out more fancied opponents Morocco, Tunisia, Congo and Nigeria on its way to the final.

"(We had) a determination, willpower and fighting spirit to say: 'OK, let's go and prove to these people we are a football team that wants to be known,'" Lwanga says.

"One of our strengths was togetherness. We had played together for quite some time. That helped a lot -- we were a family," he adds.

'We were weak'

After defeating Nigeria in the semifinals, the Cranes traveled to Ghana's hot and humid coastal capital Accra to face the tournament host. But things had started to fall apart even before the final kicked off.

He recalls power cuts and the team being frequently disturbed at the hotel before the game. Then, when they arrived at the stadium, players, coaching staff and team doctors began to feel ill.

"I don't know what happened. We were all told, please warm up. But none of us could. As humid as it was, nobody was even sweating. Not even a drop of sweat. Then people were complaining of stomach aches," he says. Soon they were "running to the toilet."

Lwanga is unsure as to whether these symptoms were brought on by the food the team had eaten or if something else untoward had gone on.

He also refuses to say for certain that Uganda would have beaten what was a "very good" Ghana side had he and his teammates been at full strength.

"I can't tell you whether we would have beaten them or not. But because some of our best players were not performing, we were weak."

End of the fairytale

A tame 2-0 defeat marked a disappointing end to what had been a fairytale journey up until the final. But Lwanga believes the nature of the loss created suspicions in the watching Ugandan delegation, which was unaware of what had happened in the locker room.

"Some people expect(ed) a lot and (thought) we were going to beat the Ghanians," Lwanga says.

"There was a lot of excitement. When we left, I think (one delegation member) sent a telex or telegram, or that's what we were told, to the president saying that these boys sold the game."

When the Ugandan team stepped off the plane back in their home capital of Kampala there was little fanfare, although Lwanga believes some of his colleagues in the forces subsequently received promotions.

"(Amin) told us before we went to Ghana that 'if you win in Ghana, I'm going to buy you houses and cars,'" Lwanga recalls. "But no, it wasn't to be."

Meeting Amin was a regular occurrence for Uganda's most prominent sporting stars, and the Cranes were no different.

The imposing 250-pound dictator, who reportedly referred to himself as "Dada" or "Big Daddy," was notorious for his brutality as well as for making outlandish claims -- like saying Hitler "was right to burn six million Jews" and offering to become King of Scotland.

JUST WATCHED Uganda's soccer stars on brink of becoming 'immortal' Replay More Videos ... MUST WATCH Uganda's soccer stars on brink of becoming 'immortal' 01:06

But Amin also had a keen interest in sport. He competed as a heavyweight boxer in between fighting for the British in World War II and joining the Ugandan army after the country's independence in 1962. Legend has it he also loved to swim, play rugby and basketball.

Lwanga says the team would always meet Amin before playing Zambia or Tanzania given the president's antipathy towards those two nations and their leaders.

"He had bad blood with (President Julius) Nyerere and President Kaunda (of Zambia). So, we would meet and him and he would give us some money. He would give us $200 each cash ... and say 'play well, come back victorious.'"

A dictator's downfall

Despite his fearsome reputation, Lwanga says Amin was generally supportive of the country's sportspeople.

By 1978, however, his ruthless grip on power was loosening. In October of that year Amin ordered the invasion of Tanzania, a maneuver that would signal the beginning of his undoing.

Within six months, Tanzanian troops and Ugandan dissidents had stormed the presidential palace in Kampala. Amin was deposed and fled to Libya before seeing out his days in exile in Saudi Arabia.

Idi Amin firing a rocket launcher with troops still loyal to him in April 1979.

"At that time, it was chaos everywhere." Lwanga says. "People were dying every day, every night." While Lwanga was able to escape the country and pursue a professional football career in the United Arab Emirates before returning three years later, others were not so lucky.

Many seen to have served Amin, including those in the police, military and prison services, which had provided so many players to the national team, found themselves under suspicion.

Lwanga claims his 1978 teammates Fred Isabirye and Meddie Lubega were shot dead because they were soldiers.

"Whoever was found to have been in the army of Idi Amin, you were either caught or you were shot at ... it was not safe. Things were so bad," he says.

Others such as striker Abbey Nasur Odero have described fleeing to neighboring Kenya to escape the violence.

AFCON return

Today, Uganda is a far more stable place, while things are also looking up in a sporting sense.

The Cranes have qualified for the 2017 AFCON championship in Gabon, the first time it has done so since 1978. The country is abuzz with anticipation.

"It has united the people more even than ever before." Lwanga says. "Not even religion can unite the people of Uganda like football. Football brings all people, religion, tribes into one table."

Uganda fans during a 2018 World Cup qualifying football match against the Republic of Congo in Brazzaville.

For Lwanga, the excitement brings back memories of his own sporting glory days. Again, Uganda is a rank outsider in a group containing the more fancied Egypt, Mali and old foe Ghana -- its opening opponent on Tuesday.

But if the current crop of Ugandan Cranes is looking for advice on how to topple the continent's big guns, they could do worse than to look to experienced hands like Lwanga.

While the game has moved on and many of today's stars like Farouk Miya are professionals plying their trade abroad, an opportunity few of 1978 team was able to experience, Lwanga believes some simple concepts that helped his side could still benefit the current generation.

"I would tell them that you go and play your game. Don't think about other teams, the names of the teams. Because that's what we did. We didn't think about Ghana," he advises.

"We didn't think about Morocco or Tunisia or Congo. We just went there to play and win.

"When you go to play and win, you forget about about Mali or Egypt. You just play your game."