The gunmen went door to door in the Kenyan costal town, demanding to know if the men inside were Muslim and if they spoke Somali. If the extremists did not like the answers, they opened fire, witnesses said on Monday.
Al-Shabab, a Somali al-Qaeda-linked group, claimed responsibility for the hours-long assault on Mpeketoni in which 48 people were killed. The attack began Sunday night as residents watched World Cup matches on TV and lasted until early Monday, with little resistance from Kenya's security forces.
After daybreak, Kenyan troops and residents stared at the bodies lying on dirt streets by still-smoldering buildings. Two hotels and many vehicles were set on fire.
The attack highlights the growing incidents of Islamic extremist violence in a country that was once viewed as the bastion of stability in East Africa, drawing tourists from around the world for safaris and beach holidays. The U.S. ambassador made Kenya's entire coastal region off-limits for embassy employees after the attack.
My brothers who stay next door to me were killed as I watched ... they sprayed them with bullets and moved on.- John Waweru, Mpeketoni resident
The merciless life-or-death religious assessment recalled al-Shabab's attack on an upscale mall in Kenya's capital, Nairobi, last September in which at least 67 people were killed, some of them after not being able to answer questions about Islam.
The Interior Ministry said that at about 8 p.m. Sunday, two minivans entered the town. Militants disembarked and began shooting. At the Breeze View Hotel, the gunmen pulled the men aside and ordered the women to watch as they killed them, saying it was what Kenyan troops are doing to Somali men inside Somalia, a police commander said on condition of anonymity because he was not authorized to share such details of the attack.
The gunmen also went door to door.
"They came to our house at around 8 p.m. and asked us in Swahili whether we were Muslims. My husband told them we were Christians and they shot him in the head and chest," said Anne Gathigi.
Another resident, John Waweru, said his two brothers were killed because the attackers did not like that the brothers did not speak Somali.
"My brothers who stay next door to me were killed as I watched. I was peeping from my window and I clearly heard them speak to my brothers in Somali and it seems since my brothers did not meet their expectations, they sprayed them with bullets and moved on," said Waweru.
'Kenya is now officially a war zone': al-Shabab
Interior Minister Joseph Ole Lenku said the attackers fled into the nearby wilds, known as the Boni Forest after a "fierce exchange of fire" with security forces. He said 20 vehicles had been set on fire.
At a news conference, Ole Lenku was put on the defensive about the government's security record after a string of attacks. He also warned opposition politicians against inciting violence, saying it was possible the attack was linked to politics. The claim was immediately dismissed by security experts.
Al-Shabab later said it carried out the attack because of Kenya's "brutal oppression of Muslims in Kenya," including the killings of Muslim scholars in Mombasa. The group said that such attacks would continue "as you continue to invade our lands and oppress innocent Muslims."
Tourists were then warned: "Kenya is now officially a war zone and as such any tourists visiting the country do so at their own peril. Foreigners with any regard for their safety and security should stay away from Kenya."
Kenya's top police commander, David Kimaiyo, said the death toll was 48. A police spokeswoman said authorities believe that several dozen attackers took part.
Mpeketoni is about 30 kilometres southwest of the tourist center of Lamu. Any tourism in Mpeketoni is mostly local, with few foreigners visiting the area. The town is about 100 kilometres from the Somali border and 600 kilometres from Nairobi
Kenya's terror threat warnings increased
Kenya has experienced a wave of gunfire and explosive attacks in recent months. The U.S., U.K., France, Australia, and Canada have all recently upgraded their terror threat warnings for the country.
The Canadian government has not issued a nationwide advisory for travel to Kenya, but asks people to "exercise a high degree of caution, due to the increasing number of terrorist attacks and incidents of crime."
It advises against all travel to northeast Kenya "to within 150 kilometres of the Kenya-Somalia border," as well as non-essential travel to Nairobi's Eastleigh neighbourhood and the city of Mombasa.
Harald Kampa, who heads an association of hoteliers and caterers on the Kenyan coast, said he wasn't aware of any immediate tourist cancellations because of the attack. But he said the attack could soon prompt more cancellations. Kenya's deteriorating security situation and travel warnings from foreign embassies has already hit the country's tourism sector.
The region saw a spate of kidnappings of foreign tourists in 2011 that Kenya said was part of its motivation for attacking al-Shabab in Somalia. Since those attacks and subsequent terror warnings, tourism has dropped off sharply around Lamu, a UNESCO World Heritage Site and the country's oldest continually inhabited town.
Al-Shabab claimed responsbility for a double bombing in Kampala, Uganda during the 2010 World Cup final that killed more than 70 people.
With files from CBC News, Reuters