For months, a struggle has brewed within Somali militant group al-Shabab over whether to shift loyalties from longtime ally al-Qaida to Islamic State.
The dispute intensified this week, after Shabab fighters ambushed and shot dead one of the group's veteran officials, Sheikh Hussein Abdi Gedi, after he reportedly tried to convince members to make the switch. Four others died in the attack.
Now, the head of al-Shabab in the Lower Shabelle region, Abu Abdalla, has issued a stark warning to the group's foot soldiers. Get out if you support IS, he said, or you will be removed by force.
Speaking to the group's media outlet on Monday, Abdalla said Shabab has made "a clear decision to defend unity" among the ranks.
The group is "one finger with one emir, and we'll support him in good and bad times," he said.
"If you belong to another group, go where you belong. If you have a different flag, take it with you. It doesn't work here, and you will be beheaded even if you have a big beard."
Abdalla was not joking. On November 16, another allegedly pro-IS commander, Sheikh Bashir Abu Numan, and eight others were killed in a factional clash near the town of Saakow.
Ties not easy to break
Al-Shabab has deep ties to al-Qaida going back to the 1990s, when the terrorist network trained some of Shabab's most prominent leaders at camps in Afghanistan and Pakistan. The two groups formally merged in 2012.
It appears that some members of al-Shabab, mainly in the lower ranks, are excited by the military success of the Islamic State group in Iraq and Syria. In contrast, al-Qaida is crippled by U.S. intelligence operations, while al-Shabab has lost most of the territory it once controlled to the African Union mission in Somalia, AMISOM.
Last month, Islamic State issued a series of videos aimed at al-Shabab, calling on the group to pledge allegiance to its leader, Abu Bakr al-Baghdadi. Shabab leaders rejected the call and said they want to continue being part of al-Qaida.
"We want to be the men who create the Islamic Caliphate and lay the foundations for it," Abu Abdalla said.
Another prominent African Islamist group, Nigeria's Boko Haram, aligned itself to IS in March, raising the question of whether al-Shabab might follow suit.
A former al-Shabab member estimates about 200 pro-IS fighters are in the group. A security expert puts the number a bit higher at 300. Neither figure is close to a majority of the group's foot soldiers.
In Somalia's semi-autonomous Puntland region, another al-Shabab cleric, Abdulkadir Mumin, declared allegiance to IS last month, but so far has escaped the purge targeting other IS sympathizers.
Last week, Somalia's president, Hassan Sheikh Mohamud, told the Associated Press that he sees little difference between al-Qaida and Islamic State.
"At the end, the result is the same," he said. "It is an evil force that's there for destruction, whether they've got the name al-Qaida or Daesh," he said - Daesh being a common Arabic name for Islamic State.