A machete-wielding man was shot and killed by police in Siyu, Lamu East on Thursday night.
Lamu County police boss Moses Muriithi said two other assailants escaped after the trio attacked and police officers.
He said two police officers were ambushed by three men armed with machetes and clubs as they were walking to Siyu Police Post around 8.45pm.
Mr Muriithi said one of the police officers was critically injured.
Locals told the Nation that they heard several gunshots near Siyu Police Post.
"The gunshots went on for about three minutes and then there was total silence.
We were later informed that a group of unknown youth armed with pangas had tried to attack officers from Siyu before one of them was gunned down," said Omar Athman, a local.
The body of the assailant was taken to Faza Sub-county Hospital mortuary.
Local authorities have asked residents to go to the morgue and identify the deceased.
Cases of insecurity in Lamu East are common.
On June 8, a policeman attached to the Tchundwa Police Post was ambushed by unknown men and hacked to death.
In December last year, a chief and an assistant chief were attacked and slashed to death in their office in broad daylight by two men disguised as women wearing Islamic clothes.
In October 2019, the mutilated body of a policeman was found dumped in a thicket on the Mbwajumwali-Kizingitini road.
On April 22, 2019, Ms Amina Bakari, 30, who was a volunteer peer educator with the Kenya Red Cross Society and a Nyumba Kumi official, was attacked with a panga by unknown
The Thursday incident comes at a time when police in Lamu East are investigating the murder of a 50-year-old man who was hacked to death by unknown assailants on July 2.
The man, who is was a charcoal trader is a cousin and close friend of the late assistant chief who was murdered last December.
The chilling murders have sparked fears of the emergence of killer gangs in the region whose aim is to murder a specific group of people, particularly police officers and local administrators for unknown motives.