Updated

One gunman shot from the right, one from the left, each killing the non-Muslims lying in a line on the ground, growing closer and closer to Douglas Ochwodho, who was in the middle.

And then the shooting stopped. Apparently each gunman thought the other shot Ochwodho. He lay perfectly still until the 20 Islamic extremists left, and he appears to be the only survivor of those who had been selected for death.

Somalia's Islamic extremist rebels, al-Shabab, attacked a bus in northern Kenya at dawn Saturday, singling out and killing 28 passengers who could not recite an Islamic creed and were assumed to be non-Muslims, Kenyan police said.

Those who could not say the Shahada, a tenet of the Muslim faith, were shot at close range, Ochwodho told The Associated Press.

Nineteen men and nine women were killed in the bus attack, said Kenyan police chief David Kimaiyo.

Al-Shabab claimed responsibility for the killings through its radio station in Somalia, saying it was in retaliation for raids by Kenyan security forces carried out earlier this week on four mosques at the Kenyan coast.

Kenya's military said it responded to the killings with airstrikes later Saturday that destroyed the attackers' camp in Somalia and killed 45 rebels.

"The United States condemns in the strongest terms today's horrific attack in Kenya by the terrorist group al-Shabab against innocent civilians," said Bernadette Meehan, the spokeswoman for the National Security Council in Washington.

"The United States stands with our Kenyan partners in the effort to counter the threat of terrorism and affirms our ongoing commitment to working with all Kenyans to combat these atrocities," her statement said.

The bus traveling to the capital Nairobi with 60 passengers was hijacked about 50 kilometers (31 miles) from the town of Mandera near Kenya's border with Somalia, said two police officers who insisted on anonymity because they were ordered not to speak to the press.

The attackers first tried to wave the bus down but it didn't stop so the gunmen sprayed it with bullets, said the police. When that didn't work they shot a rocket propelled grenade at it, the officers said.

The gunmen took control of the vehicle and forced it off the road where they ordered all the passengers out of the vehicle and separated those who appeared to be non-Muslims-- mostly non-Somalis-- from the rest.

The survivor, Douglas Ochwodho, a non-Muslim head teacher of a private primary school in Mandera, said was travelling home for the Christmas vacation since school had closed.

Ochwodho told AP that the passengers who did not look Somali were separated from the others. The non-Somali passengers were then asked to recite the Shahada, an Islamic creed declaring oneness with God.  Those who couldn't recite the creed were ordered to lie down. Ochwodho was among those who had to lie on the ground.

Two gunmen started shooting those on the ground; one gunman started from the left and other from the right, Ochwodho said. When they reached him they were confused on whether either had shot him, he said.

Ochwodho lay still until the gunmen left, he said.  He then ran back to the road and got a lift from a pick-up truck back to Mandera. He spoke from a hospital bed where he was being treated for shock.

Seventeen of the 28 dead were teachers, according to the police commander in Mandera County.

A shortage of personnel and lack of equipment led to a slow response by police when the information was received, said two police officers who insisted on anonymity because they were ordered not to speak to the press. They said the attackers have more sophisticated weaponry than the police who waited for military reinforcements before responding.

Kenya has been hit by a series of gun and bomb attacks blamed on al-Shabab, who are linked to al-Qaida, since it sent troops into Somalia in October 2011. Authorities say there have been at least 135 attacks by al-Shabab since then, including the assault on Nairobi's upscale Westgate Mall in September 2013 in which 67 people were killed.  Al-Shabab said it was responsible for other attacks on Kenya's coast earlier this year which killed at least 90 people.

Al-Shabab is becoming "more entrenched and a graver threat to Kenya," warned the International Crisis Group in a September report to mark the  anniversary of the Westgate attack. The report said that the Islamic extremists are taking advantage of longstanding grievances of Kenya's Muslim community, such as official discrimination and marginalization.

Kenya has been struggling to contain growing extremism in the country. Earlier this week the authorities shut down four mosques at the Kenyan coast after police alleged they found explosives and a gun when they raided the places of worship.

Some Muslims believe the police planted the weapons to justify closing the mosques, Kheled Khalifa, a human rights official said Friday warning that methods being used to tackle extremism by government will increase support for radicals.

One person was killed during the raid on two of the mosques on Monday. Police said they shot dead a young man trying to hurl a grenade at them.

The government had previously said the four mosques were recruitment centers for al-Shabab.