A senior Egyptian official has been accused of referring to sub-Saharan Africans as "dogs and slaves" while in Kenya for a recent United Nations conference.

The accusations were made by Kenyan diplomat Yvonne Khamati, chairwoman of the Africa Diplomatic Corp Technical Committee, in a letter dated May 29. In the letter she said the Egyptian official made the "uncivilised, undiplomatic, irresponsible, degrading and insulting" comments last week at the U.N. Environment Assembly in Nairobi, according to Al Jazeera .

Although the official remained unnamed, Khamati appeared to admit that it was Egypt's Minister of the Environment in response to a Twitter user.

Many Egyptians quickly took to Twitter to apologize on behalf of their country, using the hashtag #WeAreSorryAfrica.

The Egyptian government has said that it will investigate the racist remarks. In a statement, the foreign ministry rejected "any attempts to cast doubt on it belonging to Africa and its perpetual defense of the continent's interests."

It went on to say that it is unacceptable to use the comments to generalize or cast doubt on Egypt's African identity.