The Aga Khan University Hospital said this was the first time such an operation had been carried out in East and central Africa.
It involves implanting a prosthesis device in the penis.
“The advantage of this surgery is that the man can have intercourse anytime they like without using a medication,” the lead surgeon, Dr Ahmed Yousef, said.
The procedure was carried out on a 44-year-old man who had been suffering from erectile dysfunction for a number of years.
“It is a very nice and short procedure. It is around one hour, and then he had a good erection,” Dr Yousef told Kenya’s Citizen TV.