Hillary Clinton, the US secretary of state, has told Uganda's long-serving president to consider his own legacy and strengthen democratic institutions.
In comments made before meeting Yoweri Museveni, who has ruled the East African nation since 1986, Clinton said: "It is important for leaders to make judgments about how they can best support the institutionalisation of democracy."
"It's not about strong men; it's about strong institutions," Clinton, who is on the last leg of her 11-day African tour, said in the Ugandan capital, Kampala.
Although US officials stressed that Clinton's visit to Uganda was aimed at thanking it for its strong security assistance in Somalia and elsewhere, Washington has keenly followed Museveni's increasingly authoritarian policies.
Security forces have frequently clashed with opposition figures challenging Museveni’s decades-long grip on power, suspecting the politicians are taking advantage of public anger over the rising cost of living to instigate Arab-style uprisings.
Museveni rejects his critics’ accusation that he is clinging to power, arguing that he has people’s mandate gained through winning elections, although the opposition often disputes the election results.
Clinton's visit took her to a military base where Ugandan and US soldiers showed her the US-made "drone" aircraft now patrolling the skies over Somalia, where an African Union force is battling al-Shabab fighters.
Uganda, a strong US security partner, has contributed the bulk of the Somalia force along with Burundi.
Clinton said she foresaw a day when drones might help the US and Uganda with another of their joint military efforts - the hunt for Joseph Kony, a reclusive warlord believed to be holed up in the jungles of the Central African Republic.
Clinton also praised activists who opposed a tough draft law in Uganda targeting gays and lesbians, calling them an inspiration for others struggling to secure equal rights around the world.
She presented a coalition of Ugandan rights groups with the state department's 2011 Human Rights Defender Award, a signal to African and Islamic countries that the US will not backtrack in its fight against the legal and political persecution of homosexuals.
"It is critical for all Ugandans - the government and citizens alike - to speak out against discrimination, harassment, and intimidation of anyone. That's true no matter where they come from, what they believe, or whom they love," Clinton said.
The issue was raised in talks she held with Museveni, whose government has been accused of allowing political and religious leaders to drum up anti-gay feeling in the deeply conservative East African nation.
"You are a model for others and an inspiration for the world," Clinton said to representatives of the group, formed in 2009 to combat draft legislation which proposed the death penalty for anyone convicted of "aggravated homosexuality".
The bill, which sparked a global outcry, stalled in parliament but has been reintroduced in a watered down form by a member of Museveni's party.
The new version dropped the death sentence, but would still outlaw the "promotion" of gay rights and punish anyone who "funds, sponsors or abets homosexuality".