At least 48 people were killed when suspected Shebab militants from Somalia stormed into a Kenyan coastal town and launched a major assault on a police station, hotels and government offices, officials said.
Around 50 heavily-armed gunmen drove into the town of Mpeketoni, near the coastal island and popular tourist resort of Lamu, late on Sunday.
Witnesses said they first attacked a police station, before starting to randomly shoot at civilians, some of whom had been watching the World Cup in local bars and hotels.
Lamu deputy commissioner Benson Maisori said several buildings in the town -- which is around 100 kilometres (60 miles) from the border with Somalia -- were burned down including hotels, restaurants, banks and government offices.
"There were around 50 attackers, heavily armed in three vehicles, and they were flying the Shabaab flag. They were shouting in Somali and shouting Allahu Akbar ('God is Greatest')," he said.
Local resident and witness John Waweru, 28, said he lost two of his brothers to the attackers.
"The attackers came in around 9pm. I heard them shouting in Somali as they fired around. I lost two of my brothers, and I escaped. I ran and locked up myself in a house," he told AFP.
The fierce gun battles continued until after midnight, but by dawn on Monday the town of Mpeketoni was reported calm with security forces saying they were in pursuit of the attackers and authorities recovering the dead.
"The number of bodies taken to the mortuary is 47, while one has died in hospital," a local police officer said, as the Kenyan Red Cross also confirmed 48 people had died.
"Our officers are still combing the area," Kenyan police chief David Kimaiyo told AFP. "It is an atrocity we would not want to see repeated anywhere else."
"We suspect the involvement of Al-Shabaab in this attack. We are appealing for calm as we do our best the search for the attackers. It is a very unfortunate incident."
Kenyan troops crossed into southern Somalia in 2011 to fight the Shabaab, later joining the now 22,000-strong African Union force battling the Al-Qaeda-linked militants.
The Shabaab vowed revenge, carrying out a string of attacks on Kenyan soil, including last September's assault on Nairobi's Westgate mall in which at least 67 people were killed.
The town of Mpeketoni, a trading centre on the main coastal road, lies on the mainland some 30 kilometres (20 miles) southwest of Lamu island, a popular tourist destination whose ancient architecture is listed as a Unesco World Heritage site.
Kenyan army spokesman Major Emmanuel Chirchir described how the gunmen had stormed the town, overwhelming local police officers, and firing from vehicles "shooting people around in town."
Chirchir also said the attackers were "likely to be Al-Shabaab," although there was no immediate claim of responsibility from the Islamists themselves.
Military surveillance planes were launched shortly after the attack began.
Attackers tried to storm a police post including an armoury, but Maisori said officers had defended the building and fought the gunmen off.
Residents in villages surrounding the town also reporting that the gunmen attacked settlements as they pulled out after fighting in Mpeketoni.
"There are six bodies here, a man and a child in their house, four laying on the road," said Mohammed Hassan, a local resident of Kibaoni, a small settlement some five kilometres (three miles) outside the town.
Last month one of the Shabaab's most senior commanders, Fuad Mohamed Khalaf, released radio broadcasts urging fighters to strike Kenya.
Hundreds of British tourists were also evacuated last month from beach resorts near Kenya's port city of Mombasa following new warnings of terror attacks from Britain's Foreign Office.
Britain this week released warnings to citizens in several East African nations -- including Djibouti, Ethiopia, Kenya and Uganda, who all have troops in Somalia -- speaking of the threat of attacks at public screenings of the World Cup.
The Shabaab claimed responsibility last month for killing two Kenyan soldiers in the same district as Sunday's attack, although further north nearer to the lawless border zone with Somalia.