The officers engaged the terrorists in a fierce gun battle where they killed one and arrested two others.
The police also retrieved firearms, 36 grenades and five automatic rifles which they maintained were to be used to wreak havoc in the capital.
During the operation, police officers detained the terrorist's vehicle which was loaded with explosives.
Further investigations revealed that the car was assembled by al-Shabaab experts in El-Adde, Somalia.
Reports shared among security agencies according to The Daily Nation stated that the terrorists had probably booked a hotel room because they were carrying a key, which indicated the name of the hotel and room number.
"Our officers spotted a Mitsubishi sports car hidden in a thicket. The team alighted from their vehicles and approached it. One of the occupants came out while shooting at the officers. The officers returned fire killing the unidentified gunman instantly," the reports stated.
It added: "Two were apprehended while two are at large, among them one armed with an AK-47 rifle."
Police also identified those in custody as Kenyans, going by the national identity cards they were carrying.
Pictures of the terrorists' vehicle after it was dismantled showed that it was rigged up with 18 IEDs.