Al-Shabaab extremists from neighbouring Somalia beheaded nine civilians in an attack on a village in Kenya, officials said, adding to growing concerns that the Islamist militant group has taken up a new strategy.

The attack occurred on Saturday in the village of Jima, south-east Kenya, said James Ole Serian, who leads a task force of security agencies combating al-Shabaab, which is linked to al-Qaida.

Beheadings by al-Shabaab have been rare in Kenya even as the group has carried out dozens of deadly attacks over the years. Beheadings are not uncommon in Somalia, where the group carries them out on people who are believed to be their enemies and to terrorise local populations.

Kenya has seen an increase in attacks claimed by al-Shabaab in recent weeks, posing a security threat before next month’s presidential election. Al-Shabaab has vowed retribution on Kenya for sending troops in 2011 to Somalia to fight the group, which became the deadliest Islamic extremist group in Africa last year.

Saturday’s attack occurred in the Pandaguo area of Lamu county, where al-Shabaab fighters engaged security agencies in a day-long battle three days ago. A police report said about 15 al-Shabaab fighters attacked Jima and seized men, killing them with knives.

In recent months al-Shabaab has increased attacks in Kenya with homemade bombs, killing at least 46 people in Lamu and Mandera counties.

The increase in attacks presents a huge problem for Kenya’s security agencies before the presidential election on 8 August, said Andrew Franklin, a security analyst. On election day security agencies will be strained while attempting to stop any possible violence and al-Shabaab could take advantage, he said.

There was no immediate government comment on the latest attack. The acting interior minister, Fred Matiangi, issued a dusk-to-dawn curfew for parts of Garissa, Tana River and Lamu counties. Mandera county was already under a curfew following earlier al-Shabaab attacks. All are close to the Somali border.

The president, Uhuru Kenyatta, has not issued any statement on the recent surge in al-Shabaab attacks.

Kenya is among five countries contributing troops to an African Union force that is bolstering Somalia’s fragile central government against al-Shabaab’s insurgency. Of those countries, Kenya has borne the brunt of retaliatory attacks.