Twenty-eight people were killed on Wednesday when Al-Shabaab fighters attacked a popular Mogadishu hotel, setting off two car bombs and opening fire on security guards, according to the city's main ambulance service.
The attack, claimed by the al Qaeda-aligned Shabaab insurgents, began when a car loaded with explosives rammed the gate of the Dayah Hotel near the Somali parliament and state house.
Security sources said at least four gunmen then entered the compound and exchanged fire with security guards, but they were shot dead before reaching the main building where guests were staying. They were not counted among the 28 dead.
A second massive blast went off after ambulances and journalists had already rushed to the scene, leaving seven reporters with minor injuries, according to the National Union of Somali Journalists (NUSOJ).
They included an AFP photographer who suffered shrapnel wounds to his shoulder and leg, an Associated Press photographer and a reporter working with Al-Jazeera television.
"The number of casualties we have recorded today is 28 dead and 43 wounded. This is what we have confirmed with our teams but there were also other ambulances which carried some casualties (but) I don't know how many," said Dr Abukadir Abdirahman Adem, head of the ambulance service.
Somalia's security minister Abdirisak Omar Mohamed told reporters there were 10 people killed and 51 wounded in the attack. "We commend the security guards of the hotel who fiercely fought the Shabaab attackers to defend the hotel," he said.
AFP images showed security forces and civilians milling about outside the devastated hotel -- its windows and doors blown out -- after the first explosion, when a second car exploded with a massive blast, sending thick plumes of smoke into the air and sending people fleeing. Gunfire rang out from the hotel as civilians and rescue workers carried away the injured.
The Shabaab group claimed responsibility in a statement distributed on its Telegram messaging account.
"The mujahideen fighters have attacked a hotel and have managed to enter the hotel after detonating a car loaded with explosives," it said.
The Shabaab is fighting to overthrow the internationally-backed government of Somalia and regularly stages deadly attacks on state, military and civilian targets in the capital and elsewhere in the war-torn country. The attack -- the deadliest so far in Somalia in 2017 --came shortly before the country's election commission announced that a long-awaited presidential vote would take place on February 8.