Armed men in Kenya have killed at least seven people at a mosque in the east of the country, less than two weeks before the presidential election.

Ten men armed with AK-47 rifles opened fire on Thursday morning on worshippers in Maayleey, a remote village in Liboi district,  about 48km from Kenya's border with Somalia.

The victims include five men who were shot inside the mosque while praying at dawn, and two women who were attacked as they rushed to the scene to check what was happening, Maalim Mohamed, Garissa county commissioner, said.

The motive remains unclear, he said.

Live Box 2013221155411516200

Maayleey is close to the world's largest refugee camp, Dadaab,which holds nearly half a million people, most of them Somalis who have fled more than two decades of war and famine. 

"The bandits opened fire at the villagers at Maayleey area which is near the Dadaab refugee camp in Liboi district," Mohamed said.

"We have dispatched a team of security personnel to pursue the bandits.

The region, a hotspot of attacks blamed on al-Qaeda-linked fighters from Somalia, has seen a series of recent attacks, mostly on churches.

Somalia's al-Shabab fighters have threatened to carry out attacks on Kenyan soil in retaliation for Kenya's military push into Somalia in late 2011.

The attacks have deepened fears of insecurity in the run-up to the March 4 general election.

There are also heightened fears al-Shabab-affiliated fighters disrupting the election, with politically motivated attacks increasing during the vote.

In 2007, when the last presidential election was held, about 1,000 people died in violence.

Source: Agencies