Updated

Islamic extremists from Somalia killed 36 quarry workers in northern Kenya early Tuesday, targeting non-Muslims just like an attack 10 days ago on bus passengers.

The killings happened in Mandera County near the border with Somalia and the attackers escaped, said Kenyan police chief David Kimaiyo.

The group al-Shabab, which has been battling for years to establish hard-line Islamic rule in Somalia, claimed responsibility for the killings.

A group of about 50 heavily armed people walked into the camp next to the quarry at 12:30 a.m. as the workers were sleeping and fired warning shots, said Peter Nderitu, who works at the quarry.

Nderitu said when he heard the shooting he ran and hid in a trench from where he could hear his colleagues being asked to recite the Shahada, an Islamic creed declaring oneness with God. Then gunshots followed. He only rose from his hiding place two hours later when he was sure there was no more movement, he said. The bodies of his colleagues were in two rows and that nearly all had been shot in the back of the head, he said.

The gunmen singled out non-Muslims and killed them, said the police. The quarry camp is in the Koromey area on the outskirts of Mandera town, said presidential spokesman Manoah Esipisu.

Al-Shabab spokesman Sheikh Ali Mohamud Rage said the latest attack was a response to Kenya's troop presence in Somalia and alleged atrocities committed by the Kenyan army there, such as a recent airstrike. Al-Shabab claimed the airstrike killed innocent people and destroyed their property. The Kenyan government said the airstrike was in response to a Nov. 22 al-Shabab attack on bus passengers in Mandera County that left 28 people dead.

In that attack, the non-Muslims were also separated from other passengers and shot dead.

About 100 non-Muslims last week sought refuge at the army base in Mandera, demanding that the government evacuate them.

President Uhuru Kenyatta's chief of staff, Joseph Kinyua, attempted to persuade non-Muslim from leaving Mandera County, whose population is predominantly Kenyan Muslims of Somali origin. Those who wanted to be evacuated argued that they cannot stay because governor himself is not safe. Mandera Gov. Ali Roba survived an improvised explosive device attack on his vehicle on October 15.

The quarry attack came hours after a hotel in Wajir, also in northern Kenya, was hit by a grenade and gunfire, killing one person and wounding 13, said police.

Al-Shabab has vowed to attack Kenya for sending its troops into Somalia to fight the rebels. The Kenyan military was deployed to Somalia in Oct 2011. Since then Kenya has experienced a series of explosive and gun attacks blamed on the militants.

"I have been saying for a long time that these terrorists want to create chaos in the country by creating divisions between Muslims and Christians," said Mandera County Senator Billow Kerrow.

Kerrow said al-Shabab is also trying to fuel tribal animosity by choosing to attack other tribes and leaving out the Kenyan Somali community who are the majority in Mandera County.

"I am worried that this may get out of hand. They can be so emboldened because they are meeting no resistance and decide to take over a town," Kerrow said.

He said despite the central government's claims that it has increased the police and army presence in the county, there is a lack coordination and commitment to tackle insecurity in Mandera.

President Uhuru Kenyatta has been criticized for not cutting short a four-day official trip to Abu Dhabi, after 28 people were killed in the bus attack. Public anger increased after pictures emerged on social media appearing to show Kenyatta in a selfie at a social event and reports from media in the United Arab Emirates that he was attending Formula 1 championships instead of addressing the security crisis at home.