Two suspected thugs were shot dead and homemade guns found in Kayole area, Nairobi, on Saturday night.
They had been attacking and robbing locals when police on patrol were alerted.
Officers said their three accomplices escaped. They said they were investigating the circulation of homemade guns in the city.
It was reported in July 2016 that the crime rate in Nairobi was about twice the national average.
According to Ipsos, less than half of crime victims reported the matters to police, 54 per cent saying they did not want to escalate them and 40 per cent feeling police were inefficient and corrupt.
As police work to curb crimes in the city, other members of the public have been on high alert.
Kenya Bus issued a stern warning about a new trend last Wednesday after finding a syringe on a seat.