Delegates from North America and Europe who were attending the inauguration of the Ugandan president, Yoweri Museveni, have walked out of the ceremony in protest against his comments about the international criminal court (ICC) in The Hague, and the presence of Sudan’s leader, whom the court has indicted.

Elizabeth Trudeau, a spokeswoman for the US state department, said the US ambassador to Uganda, Deborah Malac, and a visiting Washington-based official, along with several European and Canadian diplomats, abruptly left the inauguration on Thursday after Museveni made negative remarks about the ICC in his inaugural address. She said that the US also objected to the participation in the inauguration of the Sudanese president, Omar al-Bashir. Bashir has been charged by the court for atrocities in Sudan’s western region Darfur.

Trudeau did not identify the European or Canadian diplomats involved. She said Museveni’s comments were “insulting” both to the court and to victims of war crimes and genocide.

“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, particularly when his country has committed to accountability as a state party to the Rome Statute [that established the ICC],” she said.

In his address, Museveni called the court “a bunch of useless people” and said he no longer supports it. Uganda is a member of the ICC and as such is obligated to detain and turn over suspects wanted by the tribunal. The US is not a member of the court but supports it and has called on other countries to live up to their commitments under the treaty that created it.

The walkout was preceded by expressions of concern about Bashir’s presence made by the US delegation to Uganda’s prime minister and foreign minister, Trudeau said. She added that the delegation decided to attend the inauguration despite Bashir’s attendance out of respect for US-Ugandan bilateral relations, but made the decision to leave after Museveni’s remarks.

Bashir faces two ICC indictments for atrocities linked to the conflict in Darfur, where an estimated 300,000 people have died and 2 million have been displaced since 2003, according to UN figures. He rejects the ICC’s authority and had been able to travel relatively freely in Africa and the Middle East – even to countries like Uganda and South Africa that are parties to the Rome Statute and are required to carry out ICC arrest warrants. Bashir also recently attended the inauguration of Djibouti’s president, an event attended by US officials.

Museveni, 71, was being sworn in for his fifth term. He took office in 1986 and by the time his new term ends in 2021, he will have been in power for 35 years. Museveni has not said when he will retire and some critics say he wants to rule for life.

The opposition leader, Kizza Besigye, rejected Museveni’s victory in the election in February, calling the vote fraudulent and demanding an international audit. Uganda’s highest court has since ruled in Museveni’s favour. Besigye was arrested as he addressed a crowd of his supporters on Wednesday and is being detained at an unknown location.

The government also blocked social media sites including Facebook and Twitter before the inauguration, a move criticised by human rights activists.