The Somali Islamist militant group al Shabaab said it had staged an attack in Kenya on Saturday in which gunmen ordered non-Muslims off a bus and shot 28 dead, while sparing Muslim passengers.
Three of the group led out to be killed saved their lives by reciting verses of the Koran for the militants, a local security official said.
Al Shabaab said its men had ambushed the Nairobi-bound bus outside the town of Mandera, near Kenya's border with Somalia and Ethiopia, and killed the non-Muslims in retaliation for raids on mosques in the city of Mombasa.
On Monday, police in the port city shot dead one man and arrested almost 400 others when they raided four mosques that they said were being used to recruit militants and stash weapons.
"The Mujahideen successfully carried out an operation near Mandera early this morning, which resulted in 28 crusaders perishing, as revenge for the crimes committed by the Kenyan crusaders against our Muslim brethren in Mombasa," Sheikh Ali Mohamud Rage, al Shabaab's spokesman, said in a statement.
Many Islamist militants use the term "crusaders" to describe Christians or non-Muslims in general.
Police Inspector General David Kimaiyo said 19 men and nine women had been killed. "Preliminary reports indicate that the attackers, who were heavily armed, later fled toward the border into Somali," he told reporters.
A witness, who asked not to be identified, said the attackers had boarded the bus and tried to identify Muslims and non-Muslims.
Ahmed Maalim, an official at the Mandera East sub-county security force, said the attackers had ordered passengers thought to be non-Muslims out of the bus. Three were spared after reciting Koranic verses and ordered back on the bus.
"The women and men (remaining outside) were separated, then shot at close range," he said. "None survived."
In response to the attack, Kenya's armed forces launched ground and air raids and destroyed a camp believed to have been used by the attackers. An army spokesman said the assault would continue until the attackers were arrested.
Al Shabaab claimed responsibility last year for an attack on Nairobi's Westgate shopping mall in which at least 67 people were killed, and for attacks in the Lamu region in June and July in which at least 65 people died.
The group, whose leader Ahmed Abdi Godane was killed in September, has vowed to drive Kenyan and other African Union peacekeeping troops out of Somalia.
In televised remarks, Kenyan Deputy President William Ruto said: "I want to assure you all that all those responsible for the loss of lives of Kenyans - we will pursue you everywhere, be it in Kenya, be it in Somalia."
The Mandera region is awash with guns due to its proximity to Somalia, where al Shabaab has been fighting to topple the government, and Ethiopia, whose armed Oromo Liberation Front has made incursions into Kenya.
Insecurity plagues East Africa's biggest economy, prompting Western nations to issue travel warnings and hitting the tourism industry, a major source of hard currency.