Kenyan soldiers shot dead six suspected members of a separatist group who hacked an officer to death in an attack on barracks in the port city of Mombasa, police and military officials said on Sunday.
Also late on Saturday, officers fought off armed men at a police station in the tourist resort of Malindi, about 120 km (75 miles) north east of Mombasa.
Insecurity plagues the east African country and attacks in recent years on the coast and in the capital have prompted Western nations to issue travel warnings, hitting the tourist industry which is a big contributor to the economy.
Authorities believe both attacks this weekend were carried out by members of the outlawed Mombasa Republican Council (MRC), which wants independence for the Indian Ocean coastal regions.
The gang of between 15 and 20 men that attacked the Mombasa barracks were dressed in black, wore red and blue ribbons around their heads and legs, and all had long beards and shaved heads, the port city's County Commissioner, Nelson Marwa, said.
They were carrying knives, machetes and improvised explosive devices, he told reporters.
“In the wee hours of today as it was heavily raining, a gang ... attempted to raid the 17 Kenya Rifles barracks in Nyali, but were met with fierce fire. In the process six of them were gunned down, and several escaped with gun shots,” he said.
“These were guys who were out to engage in war. We are holding one suspect who was arrested,” Marwa said.
One officer who was involved in the fighting and did not wish to be named said a colleague had been hacked to death.
“They cut one of my colleagues with machetes and killed him and that is why we responded fiercely killing many of them,” he told Reuters.
MRC secretary-general, Randu Nzai Ruwa, denied that the group had been involved in the attack.
Most attacks in recent years along Kenya's coast have been claimed by the Somali Islamist group al-Shabab, including the killing of at least 65 people in Lamu in June and July.
Authorities have accused the MRC of involvement in a spate of killings in 2012 and 2013, including attacks on the eve of the presidential elections when at least 15 people were killed. The group also denies involvement in any of those attacks.
Colonel David Obonyo, Kenya Defense Forces spokesman, said five of the attackers in the Mombasa incident were killed on the spot and a sixth was killed while trying to escape.
Ruwa also denied the MRC's involvement in the Malindi attack, which authorities said involved about 20 armed men.
“They destroyed police vehicles as they attempted to gain entry but police officers on duty fired at them and repulsed them,” Malindi sub-county commissioner, Yusuf Mohammed said.
“We believe several suspects were injured, and we have launched a hunt for them. We are suspecting the MRC and also linking this incident to the one that occurred at the navy camp in Mombasa the same night,” he said.
In the last few days there have been several attacks on security personnel.
The Interior Ministry has confirmed that 20 police officers and two police reservists were killed in an ambush in Turkana county in the northwest of Kenya early on Saturday.