Some of the militants have proclaimed allegiance to Al Qaeda, while others support the Islamic State.
As the death toll grew Sunday, the Somali president, Mohamed Abdullahi Mohamed, declared three days of national mourning. He donated blood for the victims and asked his fellow citizens to do the same.
âTodayâs horrific attack proves our enemy would stop nothing to cause our people pain and suffering. Letâs unite against terror,â Mr. Mohamed said on Twitter. âTime to unite and pray together. Terror wonât win.â
On Sunday, fire were still burning at the scene of the bombings. Senator Ahmed, deputy speaker of the upper house of Parliament, wrote on his Facebook page that the director of one hospital had told him at least 130 bodies there were burned beyond recognition.
Witnesses said the attack was made even worse by the number of cars stuck on the road where one of the bombs exploded.
âThere was a traffic jam, and the road was packed with bystanders and cars,â Abdinur Abdulle, a waiter at a nearby restaurant, said. âItâs a disaster.â
Hopes for Somalia tend to ebb and flow after more than 25 years of chaos since its central government collapsed. In recent years, there has been a bit more optimism with a new government in power. Still, in the fragile world of Somali politics, the threat of the Shabab never went away. Hundreds of people have been killed or wounded in attacks on the capital this year alone.
Analysts thought the latest attack might have been in retaliation both for the loss of territory and for increasing American drone attacks since Mr. Trump loosened restrictions meant to strictly limit civilian casualties.
United States Special Operations forces have launched 15 airstrikes against Shabab leaders, fighters, and training camps since the beginning of the year, including five strikes last month, according to The Long War Journal, which tracks American strikes against militants in Africa.
One of the strikes, on July 30, killed Ali Jabal, a Shabab commander who led forces and conducted attacks in Mogadishu and elsewhere in Somalia. After he was killed, the Pentagonâs Africa Command said his removal from the battlefield would significantly degrade the Shababâs ability to coordinate attacks in the capital and in southern Somalia.
Counterterrorism specialists said the size of the bombings Saturday, which were well beyond what the Shabab has conducted before, suggested that the group might have received help from operatives with the Qaeda arm in Yemen, Al Qaeda in the Arabian Peninsula, which is renowned for its explosives prowess.
Africa specialists said the attack could backfire on the Shabab â and that may be one reason the group has not claimed responsibility for the attack, at least so far.