A bloody rivalry has emerged between extremist groups in Somalia as the Al Qaeda-linked Al Shabaab hunts upstart fighters allied to the Daesh group, who have begun demanding protection payments from major businesses, officials tell The Associated Press.

The rivalry supports some observers’ suspicions that Al Shabaab, now scrambling to defend its monopoly on the mafia-style extortion racket that funds its high-profile attacks, is drifting from its long-declared goal of establishing a strict religious state.

The manhunt began in October with the killing of a top leader of the Daesh-linked group by a suspected Al Shabaab death squad in the capital, Mogadishu, according to several Somali intelligence officials, who spoke on condition of anonymity because they were not authorised to speak to the media.

When the body of Mahad Maalin, deputy leader of the Daesh-affiliated group, was found near a beach in Mogadishu, it set off a hunt for suspected Daesh sympathisers within Al Shabaab’s ranks, officials said. Maalin had been suspected of trying to extend his group’s reach into the capital.

Last month, the Daesh group’s Al Naba newsletter noted deadly attacks on its fighters and warned that “when the time of response comes from the Daesh, with God’s will, we will be excused.”

The Daesh-affiliated group in Somalia, largely made up of Al Shabaab defectors, first announced its presence in 2016 with attacks in the far north, far from Mogadishu and most Al Shabaab strongholds. Though estimated at a few hundred fighters at most, their emergence in one of the world’s most unstable countries has been alarming enough that the US military began targeting it with air strikes a year ago.

While Al Shabaab and its thousands of fighters have hunted down suspected Daesh sympathisers before, they had not taken the young group’s expansion seriously until now, observers say.

“Al Shabaab miscalculated Daesh’s organisational capability and ambitions to extend its reach beyond the north, having judged it by its handful of fighters there, and thus missed the bigger picture,” said Mohamed Sheikh Abdi, a Mogadishu-based political analyst.

The revelation by businessmen that Daesh-linked operatives had begun making extortion demands took Al Shabaab’s leadership by surprise, prompting the manhunt that has led to assassinations and the detention of over 50 suspected Daesh-linked extremists, including foreign fighters, two Somali intelligence officials said.

Somali intelligence officials say al-Shabab’s new manhunt is aimed at preventing the IS-linked extremists from expanding their extortion demands into southern Somalia, where al-Shabab levies millions of dollars in taxes per year on travelers and cargo meant for the lucrative port of Kismayo.

Another al-Shabab tactic against its young rival is pressuring religious leaders to issue a fatwa, or edict, declaring the IS group “un-Islamic,” thus legitimizing a war against them, according to sources close to al-Shabab who requested anonymity for fear of reprisal.

Security experts, however, say al-Shabab will find it difficult to unearth IS supporters even within its own ranks.

“That will be a major challenge,” one official said, noting that IS-linked loyalists could be waiting quietly even in al-Shabab’s leadership to make a move. “But that will probably take a long time given al-Shabab’s vigilance.”