MOGADISHU, Somalia (AP) -- Somalia's prime minister said Monday that several experienced foreign fighters took part in the most serious Islamic extremist attack on Mogadishu in years, while other officials indicated the explosive devices were more advanced than normal, a possible indication of greater involvement by al-Qaida.
Prime Minister Abdi Farah Shirdon said the presence of foreign fighters during Sunday's two-hour assault on the Supreme Court complex showed that the attack was international in nature. He ordered an investigation into the attack, which included six suicide bombings and two car bombs.
The Somali militant group al-Shabab claimed responsibility for the two-hour barrage. Al-Qaida announced a merger with al-Shabab early last year, but the group has been plagued by internal tensions between nationalist Somali fighters and foreign fighters.
Most of al-Shabab's recent bomb attacks have been small and ineffective. Sunday's was far deadlier than normal.
"We are concerned about the foreign involvement in this attack and this is why we are working so hard with our international partners on security and intelligence sharing. Once again we see that terrorism is an international problem," Shirdon said in a statement.
Shirdon did not specify the nationalities of the foreign fighters.
The death toll has risen to 35, including the nine attackers, according to a member of parliament. The prime minister said 29 died; it wasn't clear if that total included the attackers.
Al-Shabab boasts several hundred foreign fighters, including those with from the Middle East with experience in the Iraq and Afghanistan conflicts. Al-Shabab also recruits fighters from Somali communities in the United States and Europe.
Two Western officials who spoke to The Associated Press suggested that Sunday's attack may have had broader participation by al-Qaida fighters than more recent suicide bombings in Mogadishu.
One official said the explosive devices were more sophisticated -- and numerous -- than normal, while a second official said there are signs that al-Qaida is trying to assert itself in Somalia more than in the past. Both officials work on Somalia issues but both demanded anonymity because neither was authorized to speak publicly on the matter.
Dahir Amin Jesow, a Somali legislator who heads a security committee in parliament, said Monday that the death toll stood at 35 and that it could rise even further because of the number of wounded. The interior minister said Sunday that nine attackers died, including six who detonated suicide vests.
Shirdon said the victims would be honored with a state funeral.
Al-Shabab once controlled almost all of Mogadishu. African Union and Somali forces pushed the militants out of the city in 2011, but the fighters have continued to carry out bomb attacks.
Inside Madina Hospital on Monday, bleary-eyed nurses walked from room to room to assist the wounded. Nurse Amal Abdi said he has been up since Sunday to attend to victims.
"There are many horrific wounds in the hospital, so there's no time for rest for us," Abdi said as she pushed a wounded man on a stretcher into an operating room.
One of the survivors from Sunday's barrage was the country's chief justice, who stepped out of the besieged court complex and angrily yelled at soldiers, according to an AP reporter who witnessed the exchange. The country's deputy attorney general was not so lucky.
"I was sitting in my office when the men entered and started fighting and killing," said Sheikh Hassan Abdinur, the deputy attorney general, who lay in a hospital bed Monday with bandages on his stomach and hands and a tube connected to his nose. "It was beyond my imagination. There is no safe place."
Abdirashid Hashi, the deputy director of the Mogadishu-based Heritage Institute for Policy Studies, said the attack shows that al-Shabab can strike the government at will and that the group can come quite close to "decapitating" a vital government arm. The Supreme Court was in session when the attack occurred.
The attack "will force the government to revisit its priorities," Hashi said by email. "Because if it fails to provide security to the citizens in the capital, it will have difficulties justifying its demands in extending its writ to other parts of the country."
Hashi noted that Somalia's intelligence agency and foreign governments had predicted a major al-Shabab attack. Britain's Foreign Office released a statement on Friday saying it believed a terror attack was imminent.
Mogadishu, a seaside capital with whitewashed buildings and pristine beaches, is recovering from decades of war that left the city largely in ruins. Government troops -- former militia members -- have played a key part in ousting militants from towns near Mogadishu.