President Yoweri Museveni of Uganda has given a speech declaring his “love” for US President Donald Trump.
Mr Trump has denied making the remarks but US senators who attended the meeting say that he did.
The African Union demanded that Mr Trump apologise for his “clearly racist” comments.
“America has got one of the best presidents ever,” Mr Museveni said to laughter during the opening of the East African Legislative Assembly (EALA) in the Ugandan capital of Kampala.
“I love Trump because he tells Africans frankly. The Africans need to solve their problems, the Africans are weak.”
Mr Museveni’s comments are in opposition to the reaction of many leaders who have condemned Mr Trump’s language.
On Sunday, French President Emmanuel Macron told the BBC that he shared Africa’s outrage.
On Monday, people in Haiti, another country that Mr Trump disparaged, protested against the president’s remarks.
Mr Museveni’s defence of the US president came just hours after the US ambassador to Uganda criticised Mr Trump.
“[His words] are obviously quite disturbing and upsetting,” Deborah Malac said.
Mr Trump allegedly used the term “shithole countries” when asking why the US should accept immigrants from Haiti and some countries in Africa.
The White House denied Mr Trump made the comments.