The ouster of Sudan president Omar al-Bashir on April 11 continues to reverberate around the world, and particularly in sub-Saharan Africa, where ailing or aging dictators continue to cling to power.
Bashir, who came to power through a coup d'état in 1989, was last Tuesday moved to the high-security Kobar Prison in the capital Khartoum, where he used to confine thousands of his political opponents.
Yet as al-Bashir's regime writhed in its death throes, Kampala offered him relief of political asylum.
Uganda's State minister for International Relations, Henry Oryem Okellow, told a parliamentary committee last week: "If Omar al-Bashir applies for asylum in Uganda that is a matter that can be considered by the President of Uganda."
"President Omar al-Bashir was co-guarantor for the peace agreement of South Sudan, he has played a very critical role which we are very grateful for and his asylum in Uganda is something we can consider," the minister added.
So why did Kampala offer a safe haven to a leader once viewed as an implacable enemy of the NRM, keen on seeing it collapse?
Mr David Pulkol, the former director general of the External Security Organisation, recounted to this newspaper that the bad blood between Kampala and Khartoum started much earlier before al-Bashir came to power during Sadiq Al-Mahdi's regime.
Barely after Museveni captured power in 1986 after dislodging the Tito Okello Lutwa military junta, some officers fled to South Sudan and began a rebellion.
The terms of the 1972 Addis Ababa Agreement, which brought to end the first civil war, had been violated several times; the last stroke was when [the then] president Gaafar Nimeiry, on top of wanting to invade the south to take control of the newly discovered oil fields, imposed Sharia law across the country.
John Garang, who was serving as a military instructor in Khartoum, was in 1983 sent to crush mutineers in Bor, the capital of the Southern state of Jonglei, which is his birthplace. Instead he joined the mutineers commencing a second war of liberation led by the Sudan People's Liberation Army (SPLA).
According to Mr Pulkol, the south suffered "double apartheid"--of being discriminated on basis of their race and religion.
By 1986, the SPLA had captured some territory in the South. Pulkol says the NRM government sought help from the SPLA to drive back several Ugandan refugees who had fled to present day Juba in May 1986, including remnants of the Tito Lutwa administration.
It was easy to endorse because of the ties between Museveni and Garang who became friends as students. Dar-es-Salaam University was a bastion of Marxist theory where theories of writers such as Frantz Fanon underpinned violence to free masses from the clutches of oppression.
"This strategy worked but it also marked the start of a bad relationship with Khartoum," Mr Pulkol recollected.
Some remnants such as the Uganda National Liberation Army (UNLA) commander, Lt Gen Bazillio Olara Okello, had retreated to Khartoum where he died and was buried in 1990. His remains were only repatriated in February 2015 at the behest of his family, and on grounds of prevailing cordial relations with the Bashir government.
In August 1986, the rebellion broke out in northern Uganda, starting with Alice Lakwena's Holy Spirit Movement, which emerged from the shadows of the Uganda People's Democratic Army (UPDA) under Brig Justine Odong Latek and Maj Mike Kilama.
The LRA, under Joseph Kony, which rebelled in 1987, was an offshoot of the UPDA and Alice Lakwena's insurgency.
Two years after LRA rebelled, President Bashir captured power in 1989 after toppling prime minister's Sadiq al-Mahdi government. Mahdi had commenced negotiations with the SPLA, which the majority in the Arab north resented.
"What concerned Uganda most after Bashir had taken power was the declaration by the National Islamic Front (NLF) that for the Islamic revolution to succeed it must be surrounded by chaos," Mr Pulkol said. "So they started sponsoring chaos in Uganda, Kenya, Ethiopia and as far as South Africa."
Bashir was largely influenced by Hassan-al-Turabi, an Islamic ideologue who was the power behind the throne.
Turabi in 1991 invited Osama bin Laden to live in Khartoum after Saudi Arabia expelled him as he sought to establish a caliphate around the Great Lakes region.
They took away young boys from Uganda through Khartoum to the Middle East where they were indoctrinated, then came back and stirred chaos.
Ugandan intelligence had actionable intelligence that the Bashir administration supported groups like Joseph Kony's LRA, West Nile Bank Front of Juma Oris, Herbert Itongwa's Uganda National Democratic Alliance, and the Allied Democratic Forces (ADF) which was said to be behind the spate of grenade explosions around Kampala in the mid-1990s.
The DR Congo war
The Dr Congo war was another spectacle with the invisible hands of Bashir, who together with fallen Libyan strongman Muamar Gaddafi extended support to former DR Congo leader Laurent Kabila to fight Uganda, says Pulkol. The war sucked in other countries like Rwanda, Chad, Mozambique, and South Africa either as antagonists or mediators.
At the peak of the Kampala-Khartoum hostility in 1995, Uganda drove military tanks into the Sudanese embassy in Kampala and expelled diplomats and severed the diplomatic ties.
In 1998, Sudanese Antonov jets would routinely bomb areas in West Nile under pretext of pulverising SPLA bases.
Mr Jim Mugunga, a journalist with the Monitor newspaper at the time, recounted that each side viewed the other as a threat and with the utmost suspicion.
"Sudan was convinced that the uprising of the south was supported by Uganda and we had insurrection in the north which we were convinced was being supported by Sudan," he said .
Through his sources, Mr Mugunga got an exclusive interview with al-Bashir in Khartoum. He says he was not surprised when South Sudan eventually seceded and Bashir's subsequent fall though it took long.
In 1999, Uganda and Sudan implored former US president Jimmy Carter to help in mediation, in which they agreed to take steps to restore diplomatic relations and promote peace in the region, but that did not help matters.
South Sudan peace issue
According to Mr Pulkol, the convergence point of the two warring sides was the South Sudan peace process, which attracted eyes of the international community. In July 2002, Khartoum and SPLA signed the Machakos Protocol (signed in Kenya), which culminated into the 2005 Comprehensive Peace Agreement (CPA).
The CPA, among others, detailed a political transition, which climaxed into a referendum for South Sudan's autonomy and subsequent independence in 2011.
South Sudan's independence was a clear victory for President Museveni, and a debilitating loss for President Bashir.
Yet the longer these two leaders remained in power, the relations between them began to thaw.
In June 2015 when a South African High Court judge issued orders blocking president Bashir from leaving the country, where he had flown a day earlier for the 25th African Union Summit, pending hearing of a petition filed by the Southern African Litigation Centre, President Museveni, according to one diplomat, was among those who implored President Jacob Zuma not to let Bashir's arrest happen.
Al-Bashir eventually flew out of the country via a military base that same evening.
In September 2016, President Museveni flew to Khartoum for a state visit, the first to Sudan since 2006.
Last year, he visited Khartoum for the signing of the revitalised South Sudan peace agreement between embattled President Salva Kiir and Riek Machar. This was after Machar who was the vice-president to Kiir fled after falling out in July 2016, which triggered fresh fighting.
These agreements, which gave Khartoum leverage over South Sudan's commercial oil production, were seen as an avenue of helping Gen Bashir to fix his ailing economy.
Unfortunately, Bashir fell before the petro-dollars could inject a lifeline in the economy.
As the situation remains fluid after the disintegration of Bashir's deep state, Kampala will be eager to find new allies in Khartoum.
The icc issue
Defying the court. In 2016, a day to President Museveni's fifth swearing-in ceremony on May 12 for which president Bashir was invited along with other heads of state, the International Criminal Court, wrote to the Ugandan government reminding them "of their obligations as a state party" to cooperate and arrest him but the request was ignored.
On the day of swearing-in president Bashir flew into Entebbe and departed immediately after the occasion. His attendance, however, rattled diplomats from the European Union and United States who walked out of the venue at Kololo, after President Museveni made disparaging remarks about the ICC, which he claimed had an imperialistic agenda.
The International Criminal Court (ICC) indicted Bashir in 2009 on counts of crimes against humanity and genocide of more than 300,000 people in the Darfur region.
Copies of the warrant of arrest were also served to the Ugandan government, diplomatic sources told this newspaper.
In response, Museveni's critics accused him of being conflicted: on one hand relying on the ICC to rein in Kony and his deputies and on the other hand pandering to the defence of tin-pot despots.