Suspected members of Somalia's al-Shabab armed group beheaded at least three men in an attack on a Kenyan village.

"They were slaughtered. Their heads were cut off from the rest of their bodies," a police source told Reuters news agency, asking not to be named.

Police said four bodies had been found at Maleli village in Kenya's coastal county of Lamu. Area county commissioner Gilbert Kitiyo said he was aware of three deaths.

"A group of armed suspects raided and killed three locals. All the three were men," Kitiyo said, adding the suspects set houses ablaze before disappearing into a nearby forest.

"We cannot speculate, but from previous attacks, the nature and style of this attack can only be associated with these al-Shabab criminals."

READ MORE: Al-Shabab suspected in deadly bus attack in Lamu

However, coastal Police Chief Larry Kieng said the attack appeared to be motivated by local grievances.

"The number of people killed are four, and we have established it is a conflict between herders and farmers," Kieng said.

He said three suspects had been taken into custody.

In July suspected al-Shabab attackers fighters beheaded nine men in villages near Maleli and killed three police officers in another attack in the area.

The al-Qaeda-linked group aims to overthrow Somalia's UN-backed government and impose its strict interpretation of Islam. It has intensified attacks in Kenya since it sent troops into Somalia in 2011.

Al-Shabab have also claimed responsibility for a series of cross-border attacks in recent months, including a spate of roadside bombings targeting security forces.