Suspected al-Shabab fighters beheaded nine men in an overnight assault on a village in the Kenyan coastal district of Lamu, police said, days after the armed group killed three police officers in an attack on a nearby village.

A witness, who asked not to be named, confirmed the death toll to Reuters news agency.

"They raided Jima and Pandanguo villages and killed nine men. They were slaughtered like chickens, using knives," said the witness.

Kenya's Interior Ministry announced late on Saturday that curfew was imposed in three districts following the attack.

It said in a tweet that the 12-hour curfew, from 6:30pm (1530 GMT), affects parts of Lamu, Garissa and Tana River and is to be in place for the next three months.

In a televised address on Saturday morning following the death in hospital of Kenya's Interior Minister Joseph Nkaissery, President Uhuru Kenyatta spoke of "an unfortunate incident this morning, which we are assessing".

Appointing Education Minister Fred Matiangi as acting security minister, Kenyatta promised there would be "no vacuum in securing our country".

President Uhuru Kenyatta sought to reassure Kenyans when mentioning the latest killings in a speech earlier on Saturday.

"We have had an unfortunate incident this morning that we are currently assessing and addressing," he said.

Earlier in the week, three police officers were killed in an attack on a police post in Lamu, blamed on the al-Qaeda-linked al-Shabab group.