Independent terrorism specialists said the attacks represented a dangerous escalation of violence.
“It clearly demonstrates that Shabab has the capability and the will to kill civilians, terrorize the population, and destabilize the modicum of governance in the country that does exist,” said Colin P. Clarke, a senior fellow at the Soufan Center, a research organization in New York.
The government, Mr. Clarke said, “continues to flounder, unable to bring security to the war-torn capital.”
Tricia Bacon, an assistant professor at American University, said in an email that the Shabab “remains resilient, strong, able to terrorize Mogadishu at will, and, by extension, undermine the legitimacy of the Somali government.”
In January, the Shabab claimed responsibility for an attack on a luxury hotel and office complex in Nairobi, the Kenyan capital, that killed more than 20 people. In July, militants killed 26 people in a hotel in the southern port city of Kismayo, including a prominent Canadian-Somali journalist, Hodan Nalayeh.
The same month, a suicide attack by the group fatally wounded the mayor of Mogadishu, Abdirahman Omar Osman, a British-Somali citizen. And on a single day in September, the Shabab targeted an American base in Somalia and a group of Italian peacekeeping troops.
Mr. Mutiga of the International Crisis Group said the attacks showed the group’s reach. “This is a year in which they demonstrated a capacity to attack in the capital at a rate that signifies they remain a very potent player,” he said.