The battle between suspected Al-Shabaab fighters and police in Pandanguo, Lamu County, lasted more than seven hours, Inspector-General Joseph Boinnet has said.
The fighting that began at 5.30am was still raging by 1.30pm, Mr Boinnet told journalists in Nairobi.
He spoke after chairing a meeting of senior police commanders and other security agencies involved in the upcoming elections.
Two police officers were killed and seven others went missing in the fierce fighting, according to a senior government administrator.
Linda Boni Operation Director James Ole Seriani separately said enough security officers had been deployed to Pandanguo Village to hunt down the fighters.
Mr Seriani said the attackers attempted to torch Pandanguo Police Post but met fierce fire from police who were present in the area.
The officers are part of the inter-agency Operation Linda Boni aimed at ridding the expansive Boni Forest of the Somalia-based rag-tag militia.
The fighters are believed to camp, train, organise and coordinate their attacks from the dense forest that straddles the Kenya-Somalia border.
Mr Seriani said the situation was under control since security agents — including the Kenya Defence Forces (KDF), Kenya Police, Administration Police and other units — had been deployed to pursue the attackers.
He dismissed reports that some villagers in Pandanguo had been taken hostage by the suspected terrorists.
He, however, confirmed that the missing are villagers who fled after the attackers invaded the village.
“I received reports that villagers fled and hid in the thick bushes but we expect them to come back once the situation is calm,” he said.
“We are alert and we are calling for vigilance. I will give more information once we are over with the crackdown.”
This is not the first time that Pandanguo Village is being attacked by suspected Al-Shabaab militants.
On July 14, 2014, a classroom was burnt down by the suspected terrorists.
They also took with them drugs from the Pandanguo Dispensary before vandalising it.
The attackers later harvested maize on a two-acre farm in Pandanguo before vanishing into the dense Boni Forest.
The Wednesday incident comes just a week after four police officers and four pupils were killed when a police lorry they were travelling in ran over a home-made bomb suspected to have been planted by Al-Shabaab at Mararani area.
On May 31 this year, seven Administration Police officers from the Mangai Rapid Border Patrol Unit, two Kenya Defence Forces soldiers and a civilian were killed when their armoured vehicle ran over an improvised explosive suspected to have been planted by Al-Shabaab.
The incident also comes at a time when the national government is undertaking Operation Linda Boni, whose major aim is to flush out Al-Shabaab terrorists from the forest.
The operation was launched on September 15, 2015 by Interior Cabinet Secretary Joseph Nkaissery.