Witnesses in Mpeketoni said gun battles lasted for several hours and reported seeing buildings set on fire.
The town is on the mainland near Lamu island, a well-known tourist resort.
Kenya has suffered numerous militant attacks since 2011 when its forces entered neighboring Somalia to combat the al-Qaeda-linked al-Shabab group.
This is the most deadly attack in Kenya since at least 67 people were killed during a siege by al-Shabab fighters at Nairobi’s Westgate shopping centre last September.
Kenyan army spokesman Major Emmanuel Chirchir said the attackers were “likely to be al-Shabab”, but the group has not yet commented.
Other unconfirmed reports said the raid was linked to a land dispute between rival communities in the remote area.
Interior Minister Joseph Ole Lenku described the attackers as bandits, and said they had crossed a “red line”.
“I want to assure Kenyans that the perpetrators of this heinous act will be pursued to face the full force of the law,” he said at a news conference.
Police fought fierce battles with the gunmen, who fled into a nearby forest, Joseph Ole Lenku said.
President Uhuru Kenyatta earlier summoned Joseph Ole Lenku and police chief David Kimaiyo to discuss the security situation.
The attack started at 20:30 local time on Sunday as locals were watching a football World Cup match on television.
All those killed are believed to be locals. The Kenya Tourism Board (KTB) says no foreigners were in the town at the time of the attack.
Witnesses said gunmen, who had their faces covered, threw explosives into the local police station before entering and stealing weapons.
Kenya has been on high alert recently following warnings that al-Shabab was planning more attacks.
nCoe6uEcBHgAt least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…
India and Canada have decided to expel their top envoys along with other diplomats as…