Western delegations attending the inauguration of Ugandan President Yoweri Museveni on May 12, 2016 walked out of the ceremony in protest.
US, European and Canadian diplomats left abruptly when Mr Museveni made disparaging comments about the International Criminal Court (ICC).
The US State Department said they had also objected to the presence of Sudan's Omar al-Bashir at the ceremony.
President Bashir is wanted by the ICC on charges of genocide.
Thursday's inauguration - the sixth since Mr Museveni took power in 1986 - was attended by leaders from Chad, Ethiopia, Kenya, Somalia, South Africa, South Sudan, Tanzania and Zimbabwe.
In his address, Mr Museveni described the ICC as "a bunch of useless people" and said he no longer supported it.
US State Department spokeswoman Elizabeth Trudeau said: "In response to President Bashir's presence and President Museveni's remarks, the US delegation, along with representatives of the EU countries and Canada, departed the inauguration ceremonies to demonstrate our objections."
"We believe that walking out in protest is an appropriate reaction to a head of state mocking efforts to ensure accountability for victims of genocide, war crimes and crimes against humanity."
Ms Trudeau said that was especially the case as Uganda was committed to accountability as a party to the Rome statute, which established the ICC.
The Hague-based court has issued international warrants in 2009 and 2010 for President Bashir's arrest on charges of genocide for atrocities in Sudan's western Darfur region.
States in theory have a legal duty to arrest ICC suspects on their territory, but African leaders are increasingly doubtful of its authority.