MOGADISHU, Somalia -- Militants carried out a suicide attack on the court complex here, and a bomb was detonated later on the airport road, in a coordinated wave of violence Sunday in the Somali capital that left at least 20 people dead, officials said.
The Shabab, the fearsome Islamist militant group that dominated the area for years, claimed responsibility for the attacks, which were among the deadliest in Mogadishu since the Shabab were driven out of the capital in 2011. Though there had been sporadic attacks since then, security around Mogadishu had been considered much improved.
Around noon Sunday, a suicide bomber blew up the gate to the court compound, and several gunmen wearing vests packed with explosives ran in through the breach, witnesses said. An extended gun battle between the attackers and court guards followed. Witnesses said they had heard several explosions over the course of two hours, and some people who had been trapped in the courthouse by the attack jumped out of windows to seek safety.
"I am inside my office, and gunfighting is going inside the compound," said Mohamed Hassan, a deputy attorney general who was reached by telephone during the raid. "I don't know how many have been killed or wounded, or how many are safe."
Officials gave conflicting death tolls and were unclear about how many of the dead had been attackers, guards or civilians.
The Somali security minister, Abdikarim Hussein Guled, said that at least six attackers had been confirmed killed at the court complex, and that it was unclear whether more militants had been involved. Another official at the scene said there had been nine attackers. The search for bodies continued into the night.
Later Sunday, a car bomb was detonated outside a government building on the airport road as a convoy was passing, residents said. Police officials told Reuters that the vehicles belonged to Turkey and the African Union, and that Turks and Somalis were among the dead, who numbered at least three. But a Turkish official who spoke to the news agency on the condition of anonymity said a Somali driver had been killed and three Turks wounded. It was not clear whether the convoy had been the target of the bombing.
Among the dead in the attack on the court complex were a Somali journalist who had acted as the courts' media adviser and two human rights lawyers. The lawyers were identified as Mohamed Mohamud Afrah, the head of the Somali Lawyers Association, and Abdikarin Hassan Gorod, who had won the release of a Somali journalist who was jailed after interviewing a rape victim.
The two lawyers were working for a United Nations-sponsored legal aid program, said Sahra Mohamed Ahmed of the Somali Women's Development Center, who said she had known both of them.
"This was terrible death, and we lost very important lawyers, famous for their defense of the victims who cannot afford to pay," Ms. Ahmed said.
The president of Somalia, Hassan Sheik Mohamud, called the attack "nothing but a sign of desperation by the terrorists, who've lost all their strongholds and are in complete decline, right across Somalia."
The United Nations special representative in the country, Augustine P. Mahiga, also condemned the attacks. "Somalia is making remarkable progress toward stabilization," he said, "and these great strides will not be overshadowed by the desperate acts of these cowardly terrorists."
This article originally appeared in The New York Times.