NAIROBI, Kenya — The Shabab are not having a good week.

On Tuesday, African Union forces said they had killed six commanders of the Shabab, the powerful Islamic insurgent group that has terrorized Somalia for years. Among the six killed in the Janale area, the African Union said, were a Yemeni explosives expert and a Kenyan trainer.

This followed the announcement on Monday that the Pentagon had killed Hassan Ali Dhoore, a senior member of the Shabab’s security and intelligence wing, in an airstrike.

And a few days before that, the African Union said that allied forces — which include the African Union troops, Somali security services and American air power — had killed more than 20 “terrorists.”

Still, analysts question how effective this strategy is. Just like in other battle zones, such as Afghanistan or Iraq, Somalia’s militants have proved resilient in the face of superior firepower.