At a press conference in Mogadishu a couple of weeks ago, Ugandan Foreign Fffairs minister Henry Oryem Okello enjoyed one question more than most.
Why, a journalist wanted to know, were Ugandan troops in Somalia? What was the country’s direct interest in this most protracted of conflicts?
Mr Okello took a step back from the lectern, his cheeks puffed out with pride and his shoulders straight before unleashing a lecture on Uganda’s history.
The country, he said, owed a great debt of honour to the Tanzanian soldiers who freed the country from the tyranny of Idi Amin.
That episode, he said, had instilled a “spirit of pan-Africanism and offered the ideological grounding of our leadership.”
He claimed the lesson they had taken from Mwalimu Julius Nyerere’s move was that one country cannot sit idly by while another is “turned into a waste bucket”.
“There was a lot of scepticism when we first came here. They said we would leave with our tails between our legs. But we have achieved much against all the odds. We have shown African problems are best dealt with by Africans.”
Say what you like about President Yoweri Museveni, but there is no denying that the man has run the boldest foreign policy in the region in the last two decades, with some decidedly positive outcomes.
It’s too early to say what the result of the intervention in Somalia will be. The destiny of that nation will be decided by political actors within Somalia, and it is inevitable that a durable settlement should include moderate players within Al-Shabaab. But the African Union efforts there have at least offered some space for a political process to take shape.
In Rwanda, Museveni backed the RPF in its bid to stop the genocide, and his troops backed Laurent Kabila in the campaign that ended Mobutu Sese Seko’s ruinous hold on power before they, less gloriously, engaged in the scramble for the DRC’s minerals.
In South Sudan, Museveni is one of the few regional players who, for good or ill, has shown no patience with moral equivalency. He backs the South and has said the Ugandan army will join the fight if Khartoum attacks Juba.
The boldness of Uganda’s foreign policy stands in stark contrast to the decay which is occurring at home.
A visitor to Kampala these days will not take too long to draw the conclusion that Museveni is presiding over a tired, crumbling regime.
There are an astounding number of policemen on every major street armed and ready for the next “walk to work” protest.
The urban population is in the state of agitation that Nairobians were in from the late 1980s through the 1990s.
Newspaper stories indicate a government on the back foot, seeing a menacing shadow in every corner; a civil society organisation banned here, opposition leaders facing charges of murdering a riot policeman there.
Corruption has reached staggering levels even by the high standards of East Africa. Most disturbingly, the subject at evening cocktails often turns to whispered conversations about whether the hands of State House might change by force.
It need not come to that. The early Museveni years were, on balance, good ones for Uganda. He reversed the rot of the preceding decades and helped revive the economy. That legacy is threatened by his determination to be president for life.
He should start laying the ground for his exit, at least by 2016 as he claims he might. Failure to do so will mean his legacy will crumble as a nation fed up with him seeks alternatives.
The words he uttered at his swearing-in ceremony in 1986 are as true today as they were then: “The problem of Africa in general, and Uganda in particular, is not the people but leaders who want to overstay in power.”
For his own sake and for Uganda’s, Museveni must recognise, as Moi did to his credit in 1991 and in 2002, that there is a time when the best option is retreat.