The United Nations Mission in Somalia, which supports a 19,000-strong African Union peacekeeping mission in Somalia, condemned the attack and called for those responsible to be brought to justice.
The Shabab was expelled from the capital Mogadishu in 2011, but still dominates large parts of the Somali landscape and exerts influence through blackmail and links with the business community, even in places where it does not control territory.
The impending withdrawal of American troops has encouraged the Shabab to step up its attacks, said Matt Bryden of Sahan Research, a research consultancy specializing in the Horn of Africa. “Of course the Shabab reinforce it to show that it exists,” he said.
Although American drone strikes and special forces raids in Somalia are likely to continue after the withdrawal, the withdrawal is likely to have the greatest impact on the Danab, a 1,000-strong Somali unit whose troops typically operate with close American support.
“Without mentoring, you can already see how they are being used for counter-terrorism purposes, such as standing in line for the prime minister,” said Bryden. “And now two of your commanders have been killed.”
Although the Shabab fights primarily in Somalia, it has carried out attacks in other parts of East Africa and has some ambitions to beat the United States. This week, Manhattan prosecutors accused Cholo Abdi Abdullah, a Shabab agent from Kenya, of planning a 9/11-style attack on an American city.
Prosecutors said Mr Abdullah was arrested on orders from the same Shabab commander who led an attack on a hotel in Kenya in 2019 while he was training in the Philippines to hijack a plane and fly into a building in the United States.
Hussein Mohammed reported from Mogadishu, Somalia.