Gunmen holed up in a central Mogadishu hotel for more than 12 hours killed at least 10 people in the latest attack in Somalia by the Al-Qaeda group, the Shebab.
A huge car bomb that tore the front off the six-storey Ambassador Hotel in the heart of the capital signalled the start of the assault on Wednesday evening, with shooting continuing until Thursday morning when Somalia's security minister declared the attack over.
"All the gunmen were killed by the security forces," said security minister Abdirizak Omar Mohamed.
"More than 10 people are so far confirmed dead and many others are wounded," he told reporters, adding that rescuers were searching the badly-damaged building for survivors and bodies.
The toll is expected to rise as rescue and recovery efforts continue Thursday.
Medical sources said that around 40 people were so far known to be injured.
As Mohamed spoke, the bodies of three suspected attackers were displayed in the dirt outside the hotel.
The Shebab was quick to claim responsibility for the attack and has regularly in the past targeted hotels popular with government officials and wealthy Somalis.
The African Union Mission in Somalia (AMISOM), which protects the internationally-backed government and fights the Shebab, said two parliamentarians were among the dead.
Witnesses said the initial explosion, believed to be the result of a suicide car bomber ramming a vehicle into the hotel, was large by Mogadishu standards.
Smoke rose from burning cars and debris was strewn across Maka al-Mukarama, the capital's usually busy main street.
Mohamed Elmi, who was nearby at the time, said the blast "destroyed the whole area."
After the blast an unknown number of gunmen then entered the hotel. Gunfire continued throughout the night and could still be heard at dawn on Thursday.
The Shebab, an Al-Qaeda group, lost its foothold in the capital in 2011 but continues its battle to overthrow the Somali government and launches regular attacks on military, government and civilian targets in Mogadishu and elsewhere.
Violence is expected to increase with the start of the Muslim holy month of Ramadan next week, a time when Shebab traditionally ups the tempo of its attacks.
Also on Wednesday, Somali special forces claimed to have killed Mohamed Mohamud Ali -- also known as Dulyadin and Kuno -- the suspected organiser of an attack on a university in Garissa, Kenya, in April 2015 that killed 148 people, mostly students.
"Sixteen armed men, four of them senior commanders including Mohamed Mohamud Ali... were killed by the Somali commandos and the special forces of Jubaland," said Abdirashid Janan, security minister for Jubaland, a federal state in southern Somalia.
The Garissa attack was the deadliest in Kenya since the Al-Qaeda bombing of the US embassy in 1998 and was carried out by four gunmen, all of whom died.
The US also said it had killed a senior Shebab planner, Abdullahi Haji Da'ud, in a drone strike on May 27, the latest in an increasing number of air strikes and US-led or US-backed raids in Somalia targeting Shebab leaders and recruits.
"Da'ud was one of Shebab's most senior military planners and served as a principal coordinator of militia attacks in Somalia, Kenya, and Uganda," said Pentagon spokesman Peter Cook. He said Da'ud was "presumed killed".