MOGADISHU, Somalia (AP) - A barrage of bullets and two car bomb blasts 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 during the attack.
The assault was the most serious in Mogadishu since al-Shabab was forced out of the capital in August 2011. Al-Shabab controls far less territory today 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 U.N. 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 at 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, an Associated Press reporter at the scene said. Police officer Hassan Abdulahi said he saw five dead 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 on Friday released a travel warning for Somalia that warned of a high threat of terrorism. "We continue to believe that terrorists are in the final stages of planning attacks in Mogadishu," it said.
The complex and sustained nature of the assault on the court system 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 for the attack. A posting said five militants from the "Martyrdom Brigade" took part in the "daring" attack.
"Such brazen attacks, on a broad daylight and in the heart of Mogadishu, are a clear testament to the influence of HSM forces in the capital," one posting said. HSM is an abbreviation for al-Shabab.
Nine militants attacked the court complex, and that six of them detonated suicide vests, said Interior Minister Abdikarim Hussein Guled. The three others were shot and killed during the assault, he said. Guled said he couldn't immediately provide an overall death toll.
Prime Minister Abdi Farah Shirdon dismissed the attack as a "pointless and pathetic act" that he said would have no effect on the government's commitment to progress.
President Hassan Sheikh Mohamud said Somalia is moving forward but the enemy of Somalia and "of all mankind" is trying to prevent the country from prospering.
"I want the terrorist to know that our country, Somalia, is moving and will keep moving forward and will not be prevented to achieve the ultimate noble goal, a peaceful and stable Somalia, by a few desperate terrorists," Mohamud said.
Ugandan troops stationed in Mogadishu as part of the African Union force arrived at the scene once the attack started and began taking up sniper positions on rooftops.
The Supreme Court was in session and the court's chief justice may have been the target of the assault, said a Western official who had been speaking to Somali officials. The official spoke on condition he wasn't identified because he wasn't authorized to release the information.
Somali security forces have moved outside of the city to confront al-Shabab militants on Mogadishu's outskirts, but that deployment has left somewhat of a security vacuum in the city itself, a vacuum that the militants exploited on Sunday, the official said.
The gunmen took hostages in the complex's main courtroom and forced their way into other rooms in the complex, said another police officer, Abdinasir Nor.
The court complex is a confusing maze of buildings and rooms, allowing for plenty of places to hide but also for many places for gunmen to take hostages. The armed men forced their way inside the complex and immediately set off an explosion, said Yusuf Abdi, who was near the court when the attack happened.
About two hours after the assault began, survivors of the attack began coming out of the court complex. Some were crying and others held their heads in their hands.
"I never expected to make it out alive today," said Halima Geddi, who fled the court complex about two hours after the attack. She said she had taken cover behind an outer wall. "There is no peace. No one protects us. I came to see my boy who was supposed to be tried here."
At about 3 p.m. a suicide car bomber rammed his vehicle into a car carrying Turkish citizens to the airport, said Mohamed Anjeh, a police commander.
Mogadishu's main government center is heavily guarded with multiple security checks. However, the security at the court complex is not nearly as strong. The Ugandan troops who arrived on scene began pushing back on-lookers shortly after the attack began.
Most militant attacks in Mogadishu are blamed on fighters from al-Shabab, the al-Qaida-linked Islamic extremist rebel group in Somalia. Al-Shabab ruled Mogadishu from roughly 2006 until August 2011, when African Union and Somali forces pushed them out of the city. Since then the al-Shabab extremists have launched suicide bombings on the capital city every few weeks.
Despite those intermittent attacks, Mogadishu is generally considered more peaceful today than most of the previous seven years.