MOGADISHU, Somalia — A barrage of bullets and two car bombings rattled Mogadishu on Sunday when nine Al Shabab Islamic extremists stormed Somalia’s main court complex, officials said, in a two-hour attack that shows the country’s most dangerous militant group may be down but not defeated.
A preliminary death toll stood at 16, including all nine attackers. The government didn’t immediately publicize the number of security forces, government employees, and civilians who died in the attack.
The assault was the most serious in Mogadishu since Al Shabab was forced out of the capital in August 2011. The group controls far less territory now than in recent years, and its influence appears to be on the decline, but Sunday’s attack proved the extremists are still capable of pulling off well-planned, audacious assaults.
The top UN official for Somalia, Augustine P. Mahiga, said he was shocked and outraged by the attack. Mahiga said the total number of dead wasn’t clear, but that reports indicated that ‘‘many innocent civilians were killed including women and at least one child.’’
The attack on the Supreme Court complex began around 12:30 p.m., sparking running battles with police and army forces. One car bomb detonated outside the court, and gunmen were seen on the roof of a court building firing shots. Police officer Hassan Abdulahi said he saw five bodies lying at the entrance to the court.
The militants took an unknown number of hostages during the siege. Many other government workers and civilians in the court complex — a confusing labyrinth of buildings and rooms — hid while fearing for their lives.
Western officials knew militants had been planning a major violent incident. The British Foreign Office released a travel warning for Somalia on Friday that warned of a high threat of terrorism.
The complex and sustained nature of the assault on the court suggested the extremists hoped to inflict severe casualties. Later, a suicide car bomber rammed a vehicle carrying Turkish citizens, killing two.
On a Twitter feed believed to belong to the militants, Al Shabab appeared to take credit. A posting said five militants from the ‘‘Martyrdom Brigade’’ took part in the “attack.
Nine militants attacked the court complex, and six of them detonated suicide vests, said Interior Minister Abdikarim Hussein Guled. The rest were shot dead during the assault, he said.