Gunmen have opened fire on a mosque in eastern Kenya, killing at least seven people.

The attack took place on Thursday in the village of Maayleey, near the Somali border.

Local officials say five men were killed inside the mosque and two women were shot and killed as they tried to rush inside the building after hearing screams.

There was no immediate claim of responsibility.

Kenya has been plagued by a series of shooting and grenade attacks blamed on Somali militant group al-Shabab or its sympathizers. Al-Shabab vowed to seek revenge after Kenyan forces entered southern Somalia in October 2011 to fight the Islamist group.

Kenya holds general elections March 4. Analysts have warned of potential violence connected to the vote.

Ethnic violence erupted in Kenya after the disputed presidential vote in late 2007. More than 1,100 people were killed in that fighting.