At least 14 people have been killed in an early morning attack in the north of Kenya by al-Shabab, Islamic extremist rebels from neighbouring Somalia, an official said.

Eleven people were wounded in the attack in Soko Mbuzi village in Mandera County near Kenya's border with Somalia, said Mandera County commissioner Alex Nkoyo.

The attackers targeted two compounds where quarry workers live, said Charles Kamau, a stone miner. The attack started with explosions at the gates of the compounds which woke him up at 1am, he said.

Mr Kamau said he saw about 20 attackers divide into two groups, some opening fire on people sleeping outside and others attacking those sleeping inside. Mr Kamau said he went into an adjacent room where Kenyan women of Somali origin were sleeping and hid under a bed.

The attackers came into the room and pulled out a woman, identified by police as Neima Mohamed, believed to be the landlady of the buildings, and shot her dead, he said.

Tuesday's attack raises the number of people killed in Mandera County by the militants, who are allied to al Qaida, to at least 85. Nearly all those killed were non-Muslims.

Al-Shabab has vowed to carry out attacks in Kenya as retribution for the country sending troops to Somalia to fight the militants. Kenya sent its troops to Somalia in October 2011 following a series of cross-border attacks including kidnappings which the government blamed on al-Shabab.

The group has carried out a wave of attacks since 2011 in which at least 418 people have died, according to police statistics. On April 2 four al-Shabab gunmen carried out the group's deadliest attack yet on a university in eastern Kenya in which 148 people were killed, the majority of them students.