A botched robbery saw two armed gangsters shot dead by policemen on patrol.
Yutman Mgaza, a known jailbird and his accomplice fell to police bullets on Sunday night.
Mgaza was released from prison in December 2022.
According to Nairobi Police boss Adamson Bungei, the two were shot and killed as they tried to escape aboard their motorcycle.
Police and locals said a group of gunmen on a motorbike had been attacking and robbing them of their valuables and cash in Kibarange area.
They also shot and injured a 33-year-old man in the thigh. The man was admitted at Mama Lucy Hospital, Nairobi police boss Adamson Bungei said.
It was then that police launched a hunt in the area and caught up with them with the help of locals.
He said they recovered the motorcycle, two homemade guns, two empty cartridges and three live bullets.
The issue of repeat offenders has been of concern among many amid calls for mooting for ways to manage them.
Most of the jailbirds go back to crime and some of them are at times lynched by mobs while in action.
The bodies were moved to the mortuary.