Ahlu Sunna Wal-jama'ah blamed al-Shabab for the recent fighting in the town of Balad, north of Mogadishu, and said it was only defending itself against al-Shabab attacks.

In depth

 Profile: Sharif Ahmed
Timeline: Somalia
Restoring Somalia
A long road to stability
Al-Shabab: Somali fighters undeterred
 Somaliland: Africa's isolated state

Al-Shabab has not commented on the alleged beheadings.

Al-Shabab and allied groups control much of southern and central Somalia and want to impose their version of sharia (Islamic law) in the country.

Rival members of the al-Shabab and Ahlu Sunna Wal-jama'ah have clashed repeatedly over control of the region.

On Thursday, Osama bin Laden called on Somali fighters to overthrow Sharif Ahmed, the new Somali president, saying he is a "tool" of the US.

In January, the Somali parliament elected Ahmed, a moderate Islamist, to form an inclusive unity government and bring peace to the Horn of Africa state. His election was welcomed by the United Nations and the US.

Counter-terrorism officials from the United States have warned of al-Qaeda's growing ties with the al-Shabab fighters.

Last year, the US state department added al-Shabab to its list of foreign terrorist organisations.

Al-Shabab denies links to al-Qaeda and has distanced itself from the Somali opposition based in Eritrea, saying it is too secular.